Configuring HTTPS in Kubernetes
This document is to help you to configure HTTPS in the Kubernetes environment.
SSL Certificate Directory
This directory should contain required SSL-specific files for running the reverse proxy in https mode:
openiam.crtis the SSL certificate file.openiam.keyis the SSL certificate key. It is required.openiam.sslchain.crtfile will be used inSSLCertificateChainFilein Apache configurations.openiam.ssl.ca.crtfile will be used inSSLCACertificateFilein Apache configurations.
Additionally, either openiam.crt or openiam.sslchain.crt is required.
For the reverse proxy to read and use these files, you need to shift the files into the following folders.
.ssl/
openiam-configmap/.ssl/
In Terraform
rproxy.https.disabled=0
In Helm
--set openiam.rproxy.http=0
Updating the OpenIAM certificate in AKS
Pre-requisites
• Ensure the new certificate file, e.g. _6eddfb0689462086.crt is ready.
• This file should be used to replace existing openiam.crt.
• No need to run any Terraform apply.
• AKS cluster access is configured (kubectl is working).
• You have necessary permissions to edit ConfigMaps and delete pods.
To update the certificate, follow the steps below.
- Backup existing files and ConfigMap as follows.
cp /usr/local/openiam/kubernetes-docker-configuration/.ssl/openiam.crt /usr/local/openiam/kubernetes-docker-configuration/.ssl/openiam.crt.bakcp /usr/local/openiam/kubernetes-docker-configuration/openiam-configmap/.ssl/openiam.crt /usr/local/openiam/kubernetes-docker-configuration/openiam-configmap/.ssl/openiam.crt.bakkubectl get cm rproxy-ssl-certs -o yaml > rproxy-ssl-certs-backup.yaml
- Replace local certificate files by copying the new certificate over the existing one in both locations.
cp _6eddfb0689462086.crt /usr/local/openiam/kubernetes-docker-configuration/.ssl/openiam.crtcp _6eddfb0689462086.crt /usr/local/openiam/kubernetes-docker-configuration/openiam-configmap/.ssl/openiam.crt
- Edit Kubernetes ConfigMap and update the new certs as shown below.
kubectl get cm | grep proxkubectl edit cm rproxy-ssl-certs
- Restart rProxy Pod to apply changes.
kubectl get pods | grep rproxy # Find the rproxy pod namekubectl delete pod <rproxy-podname>
- Verify the update with the following command.
kubectl get pods | grep rproxy
Log in to the web console and verify that the new certificate has been updated.
openssl x509 -in _6eddfb0689462086.crt -text -noout<