May 2018
Intermediate to advanced
554 pages
13h 51m
English
In order to create Deployment objects, as usual, use the kubectl run command or prepare the YAML/JSON file that describe Deployment configuration. This example is using the kubectl run command to create a my-nginx Deployment object:
//create my-nginx Deployment (specify 3 replicas and nginx version 1.11.0)$ kubectl run my-nginx --image=nginx:1.11.0 --port=80 --replicas=3deployment.apps "my-nginx" created//see status of my-nginx Deployment$ kubectl get deployNAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGEmy-nginx 3 3 3 3 8s//see status of ReplicaSet$ kubectl get rsNAME DESIRED CURRENT READY AGEmy-nginx-5d69b5ff7 3 3 3 11s//see status of Pod$ kubectl get podsNAME READY STATUS RESTARTS AGEmy-nginx-5d69b5ff7-9mhbc 1/1 Running 0 14s ...
Read now
Unlock full access