Kubernetes

Run a pod called "yay" with the image "python" and resources request of 64Mi memory and 250m CPU

Difficulty: unrated

Source: bregman-arie/devops-exercises by Arie Bregman

Answer

kubectl run yay --image=python --dry-run=client -o yaml > pod.yaml

vi pod.yaml

spec:
  containers:
  - image: python
    imagePullPolicy: Always
    name: yay
    resources:
      requests:
        cpu: 250m
        memory: 64Mi

kubectl apply -f pod.yaml