美文网首页
4,kubectl 常见命令

4,kubectl 常见命令

作者: 滔滔逐浪 | 来源:发表于2022-03-27 08:35 被阅读0次

1,删除所有的pod

kubectl delete pod -all

2,删除单个pod

kubectl delete pod  [podname]

3, kubernetes部署nginx

Master节点上执行
kubectl create deployment nginx --image=nginx:1.14-alpine
kubectl expose deployment nginx --port=80 --type=NodePort
kubectl get pods,service
kubectl [command] [type] [name] [flags]
comand:指定要对资源执行的操作,例如create、 get、delete,describe
type:指定资源类型,比如deployment、pod、 service
name:指定资源的名称,名称大小写敏感
flags:指定额外的可选参数

相关文章

网友评论

      本文标题:4,kubectl 常见命令

      本文链接:https://www.haomeiwen.com/subject/kmssjrtx.html