October 2019
Intermediate to advanced
520 pages
13h 5m
English
A Pod is the atomic unit of deployment in Kubernetes. A Pod contains one or more containers and storage resources. Usually, there would be a single container within a Pod. Additional containers can be added to the Pod when we need small helper services. Each Pod has a unique IP address that is shared with the containers inside it. Pods are ephemeral by nature and are recreated when they need to be rescheduled. If they use no persistent volumes, the volume content vanishes when a Pod is recreated. To create a Pod, we use kind of Pod and define what image we want to use, like so:
apiVersion: v1kind: Podmetadata: name: my-pod labels: app: myappspec: containers: - name: my-container image: nginx:1.7.9
Here, we can see a definition of a Pod ...
Read now
Unlock full access