mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 09:22:43 +03:00
docs: expose hasura on https on GCP using kubernetes (close #2956)
GITHUB_PR_NUMBER: 5770 GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/5770 PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3176 Co-authored-by: Vitalii Tverdokhlib <1549046+vitaliytv@users.noreply.github.com> GitOrigin-RevId: ece332f40261e6b7afec58b81364967935b7ad9c
This commit is contained in:
parent
50fb471fae
commit
46fe9c605b
@ -166,6 +166,9 @@ If there are any errors, check the logs of the GraphQL engine:
|
|||||||
Expose GraphQL engine
|
Expose GraphQL engine
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
|
HTTP
|
||||||
|
^^^^
|
||||||
|
|
||||||
Now that we have Hasura running, let's expose it on an IP using a LoadBalancer.
|
Now that we have Hasura running, let's expose it on an IP using a LoadBalancer.
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
@ -174,9 +177,8 @@ Now that we have Hasura running, let's expose it on an IP using a LoadBalancer.
|
|||||||
--port 80 --target-port 8080 \
|
--port 80 --target-port 8080 \
|
||||||
--type LoadBalancer
|
--type LoadBalancer
|
||||||
|
|
||||||
|
Open the Hasura console
|
||||||
Open Hasura console
|
***********************
|
||||||
-------------------
|
|
||||||
|
|
||||||
Wait for the external IP to be allocated, check the status using the
|
Wait for the external IP to be allocated, check the status using the
|
||||||
command below. It usually takes a couple of minutes.
|
command below. It usually takes a couple of minutes.
|
||||||
@ -188,7 +190,63 @@ command below. It usually takes a couple of minutes.
|
|||||||
Once the IP is allocated, visit the IP in a browser and it should open the
|
Once the IP is allocated, visit the IP in a browser and it should open the
|
||||||
console.
|
console.
|
||||||
|
|
||||||
.. _gc_kubernetes_logs:
|
HTTPS
|
||||||
|
^^^^^
|
||||||
|
|
||||||
|
Let's expose Hasura with `Ingress
|
||||||
|
<https://cloud.google.com/kubernetes-engine/docs/concepts/ingress/>`_. Create service:
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: hasura
|
||||||
|
name: hasura
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 80
|
||||||
|
targetPort: 8080
|
||||||
|
selector:
|
||||||
|
app: hasura
|
||||||
|
type: NodePort
|
||||||
|
|
||||||
|
Create Managed Certificate:
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
apiVersion: networking.gke.io/v1beta1
|
||||||
|
kind: ManagedCertificate
|
||||||
|
metadata:
|
||||||
|
name: hasura-cert
|
||||||
|
spec:
|
||||||
|
domains:
|
||||||
|
- example.com
|
||||||
|
|
||||||
|
|
||||||
|
Create Ingress:
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
apiVersion: extensions/v1beta1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: basic-ingress
|
||||||
|
annotations:
|
||||||
|
networking.gke.io/managed-certificates: "hasura-cert"
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- host: example.com
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- backend:
|
||||||
|
serviceName: hasura
|
||||||
|
servicePort: 80
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Logs
|
Logs
|
||||||
----
|
----
|
||||||
|
Loading…
Reference in New Issue
Block a user