hardkubectl

Create a secret with a specific key mapped to a file's contents

command

kubectl create secret generic SECRET_NAME --from-file KEY=FILE_PATH

also accepted

kubectl create secret generickubectl create secret generic SECRET_NAME --from-file

Test your recall — not just your reading.

Practice with interactive quiz →