Section: Imperative Resource Creation

Create generic secret

bash
bash
kubectl create secret generic app-secret --from-literal=API_KEY=supersecret
Explanation

Create an opaque Secret.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Imperative Resource Creation
Create deployment
Create a deployment from an image.
OpenIn sheetbashsame section
Create configmap from literals
Create a ConfigMap imperatively.
OpenIn sheetbashsame section
Create configmap from file
Build a ConfigMap from file content.
OpenIn sheetbashsame section
Create TLS secret
Create a TLS Secret from cert and key files.
OpenIn sheetbashsame section
Create job
Create a one-time Job.
OpenIn sheetbashsame section
Create cronjob
Create a CronJob from the CLI.
OpenIn sheetbashsame section