hardkubectl

Create a TLS Secret from a certificate and private key file pair

command

kubectl create secret tls SECRET_NAME --cert=CERT_FILE --key=KEY_FILE

also accepted

kubectl create secret tlskubectl create secret tls SECRET_NAME

Command breakdown

Part of the Kubernetes CLI (kubectl) — ConfigMaps & Secrets category.

kubectlcreatesecrettlsSECRET_NAME--cert=CERT_FILE--key=KEY_FILE
FlagPurpose
--certSet to: CERT_FILE
--keySet to: KEY_FILE

Test your recall — not just your reading.

Practice with interactive quiz →