Hi All, I was going through practice and ran into a snag on question 7. wondering if someone might point out what I’ve done wrong. Provided below is the YAML I tried to use to create the pod, that failed the checks, and then the YAML provided by the solution. To me they look the same, I believe the way I supplied the command argument should work the same as the way in the solution.
#My Answer
apiVersion: v1
kind: Pod
metadata:
creationTimestamp: null
labels:
run: secret-1401
name: secret-1401
namespace: admin1401
spec:
containers:
- image: busybox
name: secret-admin
command: ['sh','-c','sleep 4800']
volumeMounts:
- name: secret-volume
mountPath: "etc/secret-volume"
readOnly: true
volumes:
- name: secret-volume
secret:
secretName: dotfile-secret
---
#Provided Solution
apiVersion: v1
kind: Pod
metadata:
creationTimestamp: null
labels:
run: secret-1401
name: secret-1401
namespace: admin1401
spec:
volumes:
- name: secret-volume
# secret volume
secret:
secretName: dotfile-secret
containers:
- command:
- sleep
args:
- "4800"
image: busybox
name: secret-admin
# volumes' mount path
volumeMounts:
- name: secret-volume
readOnly: true
mountPath: "/etc/secret-volume"