Certificate Manager
Certificates¶
The default installation of Juno products are deployed with a self signed certificate and will be flagged as untrusted by most browsers. We recommend replacing this certificate and installing the Cert Manager plugin available through the Terra plugin app store.
The Cert Manager plugin installs the third party software cert-manager which provides a easy to use service to automate certificate creation for your configured ingresses.
Setup¶
The below is an example setup of cert-manager in Orion using a custom CA, see the cert-manager website for further more detailed information on various deployment settings. We will be using a CA file and key in the example, if you wish to use an external ACME provider such as Lets Encrypt then please refer to the cert-manager docs themselves.
Requirements¶
- A CA certificate and corresponding private key in separate files locally
- Certificate in a file called
ca.crt - Key in
ca.key - See here for info on generating these files
- Certificate in a file called
- Access to your install's
kubectlcommand - A deployed project to use the cert-manager with
- Cert Manager plugin installed
Method¶
Deploy CA to the cluster
The following command will deploy your certificates located in your current folder to the cluster under the default cert-manager namespace
Setup the issuer
We now need to create an issuer pointing at the previously deployed certificate pair. The following command will create a non-namespace scoped deployment, to restrict the namespace simply include which namespace in the metadata e.g. namespace: test-deployment
Verify
Once the above is deployed we can verify it's working by running the following commands
Firstly ensure the issuer my-ca-issuer is ready to provide certificates, the following command should report back READY: True
Next we can manually issue a certificate by deploying a Certificate and referencing the issuer. Replace the values identified with values pertinent to your deployment of Orion and CA certificate
Apply to a project
We have our CA setup with the issuer so now we can apply it to our deployed project and have our CA provide a TLS certificate for the hubble ingress.
Edit the project's ingress controller using kubectl
Under annotations remove the cert-manager.io/issuer: letsencrypt-prod line and replace it with
Then append the following to the spec section
Allow some time for the secret to be created and try to access your applications web interface, you should see the certificate provided is now one provided by cert manager
$ kubectl get secrets -n <YOU PROJECT DOMAIN>
NAME TYPE DATA AGE
hubble-tls-certs kubernetes.io/tls 3 1m
This change to the project ingress will need to be made to all active and future projects deployed.