deployment

Create a deployment with the specified name.

You describe a desired state in a Deployment, and the Deployment Controller changes the actual state to the desired state at a controlled rate. You can define Deployments to create new ReplicaSets, or to remove existing Deployments and adopt all their resources with new Deployments.

Command

  1. $ kubectl create deployment NAME --image=image -- [COMMAND] [args...]

Example

Command

  1. $ kubectl create deployment my-deployment --image=nginx

Output

  1. $ kubectl get deployments
  2. NAME READY UP-TO-DATE AVAILABLE AGE
  3. my-deployment 1/1 1 1 35s
  4. $ kubectl get pods
  5. NAME READY STATUS RESTARTS AGE
  6. my-deployment-7d6dd5c955-pr4jt 1/1 Running 0 15s