Kubernetes
This guide explains how to install and use custom certificates with Qpoint in a Kubernetes environment. This process is useful when you need to use your own certificates for HTTPS traffic or when you need to trust specific Certificate Authorities.
Prerequisites
Kubernetes cluster
kubectl
command-line toolYour custom certificate file (e.g.,
qpoint.pem
)
Create a ConfigMap with the Certificate
First, create a ConfigMap that contains your certificate file:
Replace qpoint.pem
with the path to your certificate file. This command creates a ConfigMap named ca-pemstore
with the contents of your certificate file.
Modify the Pod Specification
Update your Pod YAML file to include the ConfigMap as a volume and mount it in the appropriate container(s). Below is an example of how to do this using a node.js application:
Key Additions in the YAML File
Volume Declaration:
This declares a volume that references the ConfigMap we created earlier.
Volume Mount in
main-container
:This mounts the certificate file from the ConfigMap into the container.
Environment Variable in
main-container
:This environment variable tells the application where to find the additional CA certificates.
Notes
The environment variable
NODE_EXTRA_CA_CERTS
is specific to Node.js applications. For other languages or runtimes, you may need to use a different environment variable or configuration method. Here are some common examples:Python:
SSL_CERT_FILE=/etc/ssl/certs/qpoint.pem
Java:
-Djavax.net.ssl.trustStore=/etc/ssl/certs/qpoint.pem
Go:
SSL_CERT_FILE=/etc/ssl/certs/qpoint.pem
Ensure that your application is configured to use the custom certificate. The method for doing this can vary depending on the programming language and libraries you're using.
You may need to modify the
qpoint-connect
container configuration to use the custom certificate as well, depending on your specific requirements.Always ensure that you're following best practices for certificate management, including regular rotation and secure storage of private keys.
Last updated