Deploy a microservice in Kubernetes
First we have to create the Deployment file and save it as demo-deployment.yaml
This YAML document describes a Deployment named
hello
with 3 replicas of a Pod namedhello-app
running a container with the remote imagegcr.io/google-samples/hello-app:1.0
.For more information visit: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/
Next, to actually create the deployment we execute the following:
To verify the status and information of the deployment use:
To check the pods created by the service use:
You should see 3
hello-app
pods (one for each replica)
Reference Links
Last updated