-->

App container

CoreOS started a standardization effort in December 2014 called appc. This includes standard image format (ACI), runtime, signing, and discovery. A few months later Docker started its own standardization effort with OCI. At this point it seems these efforts will converge. This is a great thing as tools, images, and runtime will be able to interoperate freely. We're not there yet.

Random Pic Of The Day!
Random Pic Of The Day!
Question Of The Day!

Installing certificates on Kubernetes

I just started to explore Kubernetes and I deployed a service in a container on Kubernetes which is running on a cloud.

My service requires to make a call to a database which requires a certificate for authentication. I am wondering what would be the best practice to store/install the certificate on Kubernetes

I need to access the certificate from my code which I am using as follows

const (
    serverCertificate = "./cert/api.cer"
    serverPrivateKey  = "./cert/api.key"
)
creds, err := credentials.NewServerTLSFromFile(serverCertificate, serverPrivateKey)

BEST ANSWER:

You could store the certificate in a Kubernetes Secret: https://kubernetes.io/docs/concepts/configuration/secret/

Here is an example on how to do so: https://kubernetes.io/docs/concepts/configuration/secret/#creating-a-secret-using-kubectl-create-secret

Quote Of The Day!

He is able who thinks he is able.
Buddha

App container Anonymous 5 of 5
CoreOS started a standardization effort in December 2014 called appc. This includes standard image format (ACI), runtime, signing, and disc...

Posts relacionados: No está disponible si la entrada carece de etiquetas

0 Comentarios