#################################
##deployment控制器 部署nginx镜像
#############名称 web 镜像--image=nginx 副本数replicas=3 容器数 docker.io/nginx:latest
##########创建失败 有时需要主机重启 running
kubectl create deployment web --image=nginx --replicas=3
##########查询get deploy,pods##########
kubectl get deploy,pods
######删除 delete deployment XXXX####
kubectl delete deployment web
######## deployment web 端口暴露###########
###kubectl expose deployment web --port=80 --target-por80 --type=NodePort
kubectl expose deployment web --port=80 --target-port=80 --type=NodePort
kubectl get service
浏览器访问
http://NodeIP:Port #端口随机生成 get svc获取
master http://192.168.254.143:32261/
node1 http://192.168.254.143:32261/
node2 http://192.168.254.143:32261/
##########kubectl get pods
web-XXXX
####查看日志 kubectl logs web-XXXX