[Kubernetes] Pods with YAML
YAML in K8S
apiVersion: v1 # v1 | apps/v1 # mandatory
kind: Pod # Pod | | Service | ReplicaSet | Deployment # mandatory
metadata: # mandatory
name:
labels:
key: value
spec: # mandatory
containers:
- name: nginx-container
image: nginx
$ kubectl create -f pod-definition.yaml
kubectl get pods