Kustomize
Medium
Generation
How do you generate a TLS Secret with Kustomize?
Select your answer:
Show answer and explanation
Answer: A secretGenerator entry with type: kubernetes.io/tls and the files tls.crt and tls.key
Explanation
secretGenerator's type defaults to Opaque. With kubernetes.io/tls, the entry must have exactly two keys, tls.crt and tls.key, from files or literals. The Secret gets a hash suffix like any generated object.
More medium Kustomize questions
- What does sortOptions.order: fifo change in the build output?
- What does generatorOptions.disableNameSuffixHash: true change?
- How can you see what kubectl apply -k would change in the cluster before applying it?
- Can a kustomization include a Helm chart?
- What does kustomize edit fix do?
- An overlay's strategic merge patch fails with "failed to find unique target for patch". What is the usual cause?