发布一个nginx deployment,进行检证。

发布
  1. kubectl create deployment nginx --image=nginx
查看deployments
  1. kubectl get deployments
  • READY=0 异常

  • Ready=1 正常

查看pods
  1. kubectl get pods -o wide
查看pods的结果
  1. NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
  2. nginx-554b9c67f9-trvqx 1/1 Running 0 81s 192.168.150.196 k8s115 <none> <none>
用curl访问nginx应用(IP是查看pods的结果的IP值)
  1. curl 192.168.40.196
文档更新时间: 2020-03-30 08:33   作者:admin