使用命令行kubectl run --image=nginx nginx-app --port=80
创建一个名为nginx-app的应用
结果: deployment.apps/nginx-app created
使用命令行kubectl get pods
查看创建结果,状态已经为running:
使用命令行kubectl describe pods查看pod明细:
把pod id记下来: nginx-app-f75d46bd9-q6c76
使用该pod id可以执行一些命令:
kubectl describe pod nginx-app-f75d46bd9-q6c76
kubectl logs nginx-app-f75d46bd9-q6c76