Kubernetes
Medium
Commands
Which command would you use to create a secret from a file?
Select your answer:
Show answer and explanation
Answer: kubectl create secret generic my-secret --from-file=path/to/file
Explanation
The 'kubectl create secret generic my-secret --from-file=path/to/file' command creates a secret from the contents of a file. This is useful for storing configuration files, certificates, or other sensitive data that needs to be accessed by pods.
More medium Kubernetes questions
- What is the purpose of a Kubernetes InitContainer?
- Which component is responsible for scheduling pods onto nodes?
- What is the purpose of a Kubernetes ResourceQuota?
- What is the difference between a RollingUpdate and a Recreate deployment strategy?
- Which command would you use to view the logs of a specific container in a multi-container pod?
- What is a Kubernetes Toleration?