linux怎么查看本机内存大小
251
2022-09-08
K8sPod资源基础管理操作
陈述式对象配置管理方式
陈述式对象配置管理机制,是由用户通过配置文件指定要管理的目标资源对象,而后再由用户借助于命令直接指定K8S系统要执行的管理操作的管理方式,常用的命令由create、delete、replace、get和describe等。
创建Pod资源:kubectl create -f pod-example.yaml 查看Pod状态:kubectl get -f pod-example.yaml kubectl get -f pod-example.yaml -o custom-columns=NAME:metadata.name,STATUS.status.phase kubectl describe -f pod-example.yaml 更新Pod资源:kubectl get pods pod-example.yaml -o yaml > pod-example-update.yaml sed -i ‘s@(image:).*@ikubeernetes/myapp:v2@’ pod-example-update.yaml kubectl replace -f pod-example-update.yaml 删除Pod资源:kubectl delete -f pod-example.yaml
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~