- Already have a cluster up and running as described in Getting cockroachDB running with Kubernetes and are using the Google Cloud console shell with the kubectl CLI. The database is of course not necessary for this example, but the cluster and CLI preparation is.
- created an app to be deployed as described in Building your App ready for Kubernetes deployment
- deployed it as described in Creating a Kubernetes deployment
- created a service as described in Creating a microservice on Kubernetes
- created an ingress controller as described in Bringing up an ingress controller
- started the cert-manager process described in Managing ssl for ingress certificates with cert-manager
- added an A record to the DNS record for the domain you’ll be assigning your app pointing at the ip address exposed by Bringing up an ingress controller
- You might also find Digging around on the Kubernetes cluster of some use to help with familiarity of concepts.
I recommend that you save your commands in various scripts so you can repeat them or modify them later.
In this article – we’re doing this.
This is the last step to getting your app out there. For my example, I’m using one of my existing domains, and services so I won’t go into the app itself here. For an example app you can see Getting a simple app running on Kubernetes
- host: xxx.xxx.yourdomain.com
- path: /
- The annotations tell the ingress how to get its tls secret created by the cert-manager clusterissuers described in Managing ssl for ingress certificates with cert-manager, and associates it with an ingress controller created in Bringing up an ingress controller
- The service associates it with the service name of the type desribed in Creating a microservice on Kubernetes
and you can apply it
kubectl apply -f make-ingress.yaml
We’re done – thanks for sticking with me the whole way.