Pods
What Is a Pod?
A pod is the smallest and simplest unit in the Kubernetes object model that you create or deploy. A pod encapsulates one or more containers, storage resources, a unique network IP address, and options that govern how the container(s) should run.
Pods can be used in either of the following ways:
- One container runs in one pod. This is the most common usage of pods in Kubernetes. You can view the pod as a single encapsulated container, but Kubernetes directly manages pods instead of containers.
- Multiple containers that need to be coupled and share resources run in a pod. In this scenario, an application contains a main container and several sidecar containers, as shown in Figure 1. For example, the main container is a web server that provides file services from a fixed directory, and the sidecar container periodically downloads files to the directory.
In Kubernetes, pods are rarely created directly. Instead, controllers such as Deployments and jobs, are used to manage pods. Controllers can create and manage multiple pods, and provide replica management, rolling upgrade, and self-healing capabilities. A controller generally uses a pod template to create corresponding pods.
Viewing Pods
You can create pods by calling the API or running the kubectl command. However, these pods cannot be managed on the console because they are not used to deploy a workload or execute a job. To solve this problem, CCI provides pod management, which allows you to filter pods by source.
You can view details about all pods, including basic information, container composition, monitoring data, and events. You can use the web-terminal to access pods. In addition, you can view pod logs and delete pods.
Creating a Pod Using kubectl
For details, see Pod in the Developer Guide.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot