Skip to main content

Secrets

Creating a secret

You can create a secret from binary files by doing the following

oc create secret generic sample --from-file=./file1.bin --from-file=./file2.bin

You can then assign them to a volume and mount them to a file structure like below

    spec:
volumes:
- name: sample
secret:
secretName: sample
defaultMode: 420

containers:
volumeMounts:
- name: sample
readOnly: true
mountPath: /path/to/files