当前位置:网站首页>Detailed explanation of kubernetes (VI) -- pod object deployment and Application
Detailed explanation of kubernetes (VI) -- pod object deployment and Application
2022-04-22 14:21:00 【Always a teenager】
Today I will continue to introduce Linux Operation and maintenance related knowledge , The main content of this paper is Pod Object deployment and application .
In the foreword Kubernetes Detailed explanation ( Four )—— be based on kubeadm Of Kubernetes Deploy in , We introduced Kubernetes Cluster installation and deployment . Next , We will use it Kubernetes colony , To achieve Pod Object creation 、 see 、 Access and delete .
One 、Pod Resource creation
Pod The format of the command to create a resource object is :
kubectl run 【Pod name 】 --image=【Pod The image name used 】 --port=【Pod The port on which the object runs 】 --replicas=【 Created Pod Number of copies of object 】
for example , Carry out orders :
kubectl run pod-test --image=nginx:1.12 --port=80 --replicas=1
You can open a mirror , The results are as follows :

such ,Pod The object is created successfully !
Two 、Pod Resource view
Pod After the resource object is created successfully , We carry out orders :
kubectl get deployment
or
kubectl get pods
You can see Pod Information about , The execution results of these two commands are as follows :


Based on these two commands , add -o wide Parameters , You can see the Pod Object details , The order is as follows :
kubectl get deployment -o wide
kubectl get pods -o wide
The execution results of these two commands are as follows :


In the result of the above command execution ,NAME yes Pod The name of the object , This name is prefixed with the name we are creating Pod The name specified when the object , Followed by a random number ;READY Is the number of ready , The number before the slash is the number of containers ready , The number after the slash is the Pod The total number of containers in the container ;STATUS Indicates the running state of the container ;RESTART Indicates the number of restarts of the container ;AGE Indicates the running time of the container ;IP Indicates the of the container IP Address ;NODE It means that we should Pod The node ;IMAGES It means that we should Pod The mirror image used ;SELECTION It means that we should Pod The label of ;
3、 ... and 、Pod Access to resources
Pod After the resource is created , We can access the Pod resources . We are Pod When viewing objects , You can see that Pod Resources IP Address .
We use curl You can visit the Pod resources , The results are as follows :

Be careful :
stay Kubernetes In the cluster , Just as it should be Pod Running on the Node2 On , But it can be implemented on any node Pod The interview of .
Four 、Pod Node delete
If we want to delete Pod node , The command format is :
kubectl delete pods 【Pod name 】
The execution result of this command is as follows :

Be careful , stay Kubernetes In the cluster , Because of the Pod By Controller Controlled by the controller , So although we can delete this Pod object , however Controller The controller is created again Pod object .
Originality is not easy. , Reprint please explain the source :https://blog.csdn.net/weixin_40228200
版权声明
本文为[Always a teenager]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204221418111342.html
边栏推荐
- 图的遍历 深度优先DFS 广度优先BFS
- Qiniu school asks you to download Dragonfly gold to open an account before you can continue to study? Can I download it? Is it safe?
- Hashtable hash table practice finding, inserting, deleting 217, 349, 202, 287, 290, 532, 205, 128
- Deep transfer learning
- Blocking queue-
- 动规初解||最大子序和 最长上升子序列53、128
- Move blog to CSDN
- MapReduce高级应用——全排序和二次排序
- String inversion exercises 344, 541, 557, 151
- 【鲲鹏迁移及实践帖子汇总】第一弹~~
猜你喜欢

深入剖析volatile原理

北斗gps卫星时间同步装置(卫星时钟)在广电系统的应用
![[pytorch] implement the simplified version of yoov3 [v] and realize the yoov3 loss function (I)](/img/77/bdd57d21a92da50b4e5598288e88dd.png)
[pytorch] implement the simplified version of yoov3 [v] and realize the yoov3 loss function (I)

Lors de l'obtention d'une valeur dans la base de données, la base de données a une valeur, mais elle est vide.

An error is reported when reading the attribute value of the object through the variable storage key value in TS (TS: 7053)

知识就是力量,但更重要的是运用知识的能力---网页端微信扫码支付-技术设计

获取数据库中数值时,数据库有值,却为空??

Kubernetes详解(六)——Pod对象部署和应用
![[paper notes] vision transformers for dense prediction](/img/71/aaf1509237192923ee71a5148e5502.png)
[paper notes] vision transformers for dense prediction

独立站运营 | 6个Facebook推广小技巧,你都知道吗?
随机推荐
回溯 全排列 第k个排列 优美的排列 组合 组合总和 N皇后I II
3. fiddler证书安装和抓取hettps设置
2. Flddler response shows the solution to the problem of garbled code
Solve command line is too long Shorten command line for........ error
Tools applicable to any database - Shanghai daoning brings a powerful general database management tool dbeaver to developers and database administrators
20道25K+Android工程师面试必问面试题,网易Android面试必问
Greedy dynamic rules 𞓜 Jumping Games 45, 55
Shiro's cache management
移动端自适应与响应式布局
2020火爆全网系列:这是一份非常适合领取与收藏的Android进阶-面试重难点资料笔记!持续更新大厂高质量面试链接
数据库SQL实战全解
Multithreading primary
HashTable哈希表与统计594、350、|554、609、454、18
Redis相比memcached
多线程初阶
C language sanziqi, summed up a perfect SQL learning note in 22 days
BinaryTree练习 从前序与中序、中序与后序遍历序列构造二叉树||重构二叉树654、105、106
Advanced multithreading
Double pointer 𞓜 ordered array to reorder the linked list and remove elements 26, 27 and 83
Binary Tree递归||二叉树展开为链表 530. 二叉搜索树的最小绝对差