How to deploy Web Service in Kubernetes
Easy steps to start with deploying a Web Service in Kubernetes:
Make a docker image of your application
Push to docker registry
Make a
deployment.yaml
It describes how pods will run; We will configure env variables here.
To store application settings create one or more
configmap
.To store one or more secrets create one or multiple secret.yaml and link it with
deployment.yaml
.For one-off tasks such as migration, certificate renewal, etc. make one or more jobs.
To expose your web application, create a Service.
To make it available to public use Loadbalancer type Service.
Alternatively if you have ingress configure it to expose your service as well.