Exploring the Kubernetes object model

From MyWiki
Jump to: navigation, search

A Pod is a logical collection of one or more containers, which:

  • Are scheduled together on the same host with the Pod
  • The same network namespace
  • Have access to mount the same external storage (volumes).

Below is an example of a Pod object's configuration in YAML format:

apiVersion: v1
kind: Pod
metadata:
  name: nginx-pod
  labels:
    app: nginx
spec:
  containers:
  - name: nginx
    image: nginx:1.15.11
    ports:
    - containerPort: 80