apiVersion: v1
kind: Pod
metadata:
name: secret-example-pod
spec:
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
containers:
- name: secret-test-container
image: busybox
command: [ "/bin/sh", "-c", "cat /etc/secret-volume/*" ]
volumeMounts:
- name: secret-volume
mountPath: /etc/secret-volume
readOnly: true
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: [ALL]
volumes:
- name: secret-volume
secret:
secretName: test-secret
restartPolicy: Never
apiVersion : v1
kind : Pod
metadata :
name : secret- example- pod
spec :
securityContext :
runAsNonRoot : true
seccompProfile :
type : RuntimeDefault
containers :
- name : secret- test- container
image : busybox
command : [ "/bin/sh" , "-c" , "cat /etc/secret-volume/*" ]
volumeMounts :
1
- name : secret- volume
mountPath : /etc/secret- volume
2
readOnly : true
3
securityContext :
allowPrivilegeEscalation : false
capabilities :
drop : [ ALL]
volumes :
- name : secret- volume
secret :
secretName : test- secret
4
restartPolicy : Never
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow