k create deployment --image=nginx nginx --dry-run=client -o yaml > nginx-deploy.yaml
Code Block
sansae@sansaeAir15m2 ~ % k apply -f nginx-deploy.yaml
deployment.apps/nginx-deploy created
sansae@sansaeAir15m2 ~ % k get all
NAME READY STATUS RESTARTS AGE
pod/nginx-deploy-d4d6c7dd8-4zx7v 1/1 Running 0 3s
pod/nginx-deploy-d4d6c7dd8-m6p7j 1/1 Running 0 3s
pod/nginx-deploy-d4d6c7dd8-rm5hj 1/1 Running 0 3s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/kubernetes ClusterIP 10.0.0.1 <none> 443/TCP 8h
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/nginx-deploy 3/3 3 3 3s
NAME DESIRED CURRENT READY AGE
replicaset.apps/nginx-deploy-d4d6c7dd8 3 3 3 3s