Bird
0
0

You run kubectl create secret tls mytls --cert=cert.pem but receive an error. What is the most likely cause?

medium📝 Troubleshoot Q7 of 15
Kubernetes - Secrets
You run kubectl create secret tls mytls --cert=cert.pem but receive an error. What is the most likely cause?
AThe certificate file is invalid or corrupted
BThe private key file is missing or not specified
CThe secret name 'mytls' is already in use
DThe Kubernetes cluster does not support TLS secrets
Step-by-Step Solution
Solution:
  1. Step 1: Review command requirements

    Creating a TLS secret requires both a certificate and a private key file.
  2. Step 2: Identify missing parameters

    The command only specifies --cert=cert.pem but omits --key=key.pem.
  3. Final Answer:

    The private key file is missing or not specified -> Option B
  4. Quick Check:

    TLS secrets need both cert and key files [OK]
Quick Trick: TLS secrets require both cert and key files [OK]
Common Mistakes:
  • Assuming only the cert file is needed
  • Ignoring the need for a private key
  • Thinking the error is due to secret name conflicts

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes