Replace the kubeops-cert with your own cert
This section outlines how to replace the default kubeops certificate with a custom one by creating a new certificate in a Kubernetes secret and updating the configuration accordingly.
less than a minute
Replace the kubeops-cert with your own cert
1. Create your own cert in a secret
In this example, a new secret with the name example-ca is created.
This command creates two files: tls.key and tls.cert:
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout tls.key -out tls.crt -subj "/CN=foo.bar.com"
Create a new tls secret in the namespace cert-manager:
kubectl create secret tls example-ca --key="tls.key" --cert="tls.crt" -n cert-manager
2. Create the new configuration
Make sure that certman is set to true.
certman: true
Add the following section to kubeopsctl.yaml.
certmanValues:
secretName: example-ca
3. Apply the new configuration with kubeopsctl
kubeopsctl apply -f kubeopsctl.yaml