converting openSSL x509 into Kubernetes secrets

$ kubectl create secret tls tls-secret-<secret-name> --key <key-name>.key --cert <certificate-name>.crt

$ kubectl get secrets/tls-secret-<secret-name> -o yaml 

This will give you some output like

apiVersion: v1
data:
    tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS
    tls.key: LS0tLS1CRUdJTiBQUklWQVRFIE

Leave a Reply

Your email address will not be published. Required fields are marked *

19 + 11 =