1. 执行命令 kubectl run nginx --image=nginx
#输出:
kubectl run --generator=deployment/apps.v1beta1 is DEPRECATED and will be removed in a future version. Use kubectl create instead.
deployment.apps/nginx created
2. 执行命令: kubectl get deployment
#输出:
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
nginx 1 1 1 1 4m
3.执行命令:kubectl get pods
输出:
NAME READY STATUS RESTARTS AGE
nginx-65899c769f-qjlfj 1/1 Running 0 4m