(16) Kubernetes cluster environment construction-environment test

  1. Deploy an nginx program in the kubernetes cluster to test whether the cluster is working properly
#部署nginx
kubectl create deployment nginx --image=nginx:1.14-alpine

#暴露端口
kubectl expose deployment nginx --port=80 --type=NodePort

#查看服务状态
kubectl get pods,svc

Insert picture description here
Enter the address to test nginx:
Insert picture description here

》》》Bloggers update their learning experience for a long time, recommend likes and follow! ! !
》》》If there is something wrong, please leave a message in the comment area, thank you! ! !

Guess you like

Origin blog.csdn.net/qq_41622739/article/details/113862666