In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains the "introduction of pod attributes of Kubernetes", the content of the explanation is simple and clear, easy to learn and understand, now please follow the editor's ideas slowly in depth, together to study and learn the "introduction of pod attributes of Kubernetes" bar!
We can first use the kubectl get pods command to get the list of pod, for example, we want to study the details of pod nginx-storage-pod:
Use the command kubectl describe pod nginx-storage-pod > nginx-storage-pod.yaml to redirect the output of the describe command to a yaml file. Open the yaml file with vi:
All the properties of pod can be learned from this yaml file:
Node:shoot--k8s-train--shacw46-worker-prvfv-z1-7844dc6744-ghd5m/10.250.0.6
Indicates the node where the pod is located, and this node must be one of the results returned by the command kubectl get node:
Image
Image: represents the docker image on which the pod was created.
Mount: the physical file directory corresponding to the persistent volume used by the pod. My example is .usr / share/nginx/html.
Where did this path come from? This is the definition in the yaml file of my pod file:
In addition to the attributes described in this article that can be used to delve into pod, the describe command can also be used to troubleshoot errors when pod does not start properly.
For example, I have a pod named another3, which has a status of CrashLoopBackOff all the time, and the number of RESTART is 12:
Using kubectl describe pod another3, you can see the details of the container startup: Back-off restarting failed container
Examining pod's yaml file carefully, I found that the reason is that I defined the name of volume as content-storage, but did not specify persistentvolumeclaim. When I delete volumes:-name: content-storage
The following figure shows the modified yaml file:
Recreate the pod named another3, which is quickly created and the state is in running:
Thank you for your reading, the above is the content of the "introduction of pod attributes of Kubernetes", after the study of this article, I believe you have a deeper understanding of the introduction of pod attributes of Kubernetes, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.