May 2018
Intermediate to advanced
554 pages
13h 51m
English
Kubernetes Deployment is the ideal resource type for a Service. For Pods supervised by the ReplicaSet and Deployment, the Kubernetes system has a controller manager to look over the their life cycles. It is also helpful for updating the version or state of the program by binding the existing Services to another Deployment. For the following commands, we create a Deployment first, and attach a Service with an external IP:
// using subcommand "run" and assign 2 replicas$ kubectl run nginx-deployment --image=nginx --port=80 --replicas=2 --labels="env=dev,project=My-Happy-Web,role=frontend"deployment.apps "nginx-deployment" created// explicitly indicate the selector of Service by tag "--selector", ...