SQLServer Decimal数据类型怎么赋值
238
2022-09-11
Kubernetes----Kubernetes中通过指令式命令的方式方式管理对象
一、创建对象
如下,创建dev命令空间
[root@master object_manage]# kubectl create namespace devnamespace/dev created[root@master object_manage]#
如下命令为创建一个deployment
[root@master object_manage]# kubectl create deployment nginx --image nginx -n devdeployment.apps/nginx created[root@master object_manage]#
二、查看对象
如下,查看dev命名空间中的pod
[root@master object_manage]# kubectl get pod -n devNAME READY STATUS RESTARTS AGEnginx-6799fc88d8-phb2b 1/1 Running 0 2m16s[root@master object_manage]#
如下,查看dev命名空间中的deployment
[root@master object_manage]# kubectl get deployment -n devNAME READY UP-TO-DATE AVAILABLE AGEnginx 1/1 1 1 2m55s[root@master object_manage]#
如下,为同时查看dev命名空间中的deployment和pod
[root@master object_manage]# kubectl get deploy,pod -n devNAME READY UP-TO-DATE AVAILABLE AGEdeployment.apps/nginx 1/1 1 1 3m31sNAME READY STATUS RESTARTS AGEpod/nginx-6799fc88d8-phb2b 1/1 Running 0 3m31s[root@master object_manage]#
三、更新对象
如下为更新deployment中的pod副本数量,由原来的1修改为3
[root@master object_manage]# kubectl scale deployment nginx -n dev --replicas 3deployment.apps/nginx scaled[root@master object_manage]#
此时继续查看dev命名空间下的deployment和pod,pod数量已更新为三个了
[root@master object_manage]# kubectl get deploy,pod -n devNAME READY UP-TO-DATE AVAILABLE AGEdeployment.apps/nginx 3/3 3 3 5m40sNAME READY STATUS RESTARTS AGEpod/nginx-6799fc88d8-6xfbz 1/1 Running 0 18spod/nginx-6799fc88d8-phb2b 1/1 Running 0 5m40spod/nginx-6799fc88d8-sp9q8 1/1 Running 0 18s[root@master object_manage]#
四、删除对象
如下为删除dev命名空间中的deployment
[root@master object_manage]# kubectl delete deployment nginx -n devdeployment.apps "nginx" deleted[root@master object_manage]#
此时查询dev命名空间的deployment和pod,发现都已经被删除了
[root@master object_manage]# kubectl get deploy,pod -n devNo resources found in dev namespace.[root@master object_manage]#
如下为删除dev命名空间
[root@master object_manage]# kubectl delete namespace devnamespace "dev" deleted[root@master object_manage]#
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~