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.
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
He is able who thinks he is able.
Buddha