Complete the code to create a Pod with a single container named nginx.
kubectl run mypod --image=nginx --restart=[1]The --restart=Never flag tells Kubernetes to create a Pod directly, not a Deployment.
Complete the YAML snippet to define a Pod with one container named 'app'.
apiVersion: v1
kind: Pod
metadata:
name: mypod
spec:
containers:
- name: [1]
image: busyboxThe container name is 'app' as specified in the task.
Fix the error in the command to get Pod details.
kubectl get [1] mypodPods are retrieved with kubectl get pods. Using other resources will cause errors or wrong output.
Fill both blanks to create a Pod spec with two containers named 'web' and 'db'.
spec: containers: - name: [1] image: nginx - name: [2] image: mysql
The first container is named 'web' and the second 'db' as per the task.
Fill all three blanks to create a Pod with a container named 'api', image 'myapi:latest', and restart policy 'Always'.
apiVersion: v1 kind: Pod metadata: name: apipod spec: containers: - name: [1] image: [2] restartPolicy: [3]
The container name is 'api', the image is 'myapi:latest', and the restart policy is 'Always' to keep the Pod running.