Reputation: 51
Hey I am new to kubernetes and playing around with jenkins deployment. I have deployed jenkins master pod through the deployment.yaml
as well service and pvc.yaml
.
I set the service as node port and but how do I secure and manage jenkins secret ? Do I need to create some sort of configmap for this ? I usually get jenkins secrets from kubectl logs . Any help or suggestion will be greatly appreciated to make this more secure :)
Upvotes: 3
Views: 4484
Reputation: 4108
First let's clear some concepts and background:
Since you are new to kubernetes, I'll help you understand the scenario better and give you suggestions to achieve your goal.
A ConfigMap stores configuration data as key-value pairs. ConfigMap is similar to Secrets, but provides a means of working with strings that don’t contain sensitive information.
I'm posting the description of Configmap to help you understand that it's powerful to handle data but it's not applicable for storing sensitive information, hence will not be mentioned below.
Kubernetes Secrets lets you store and manage sensitive information, such as passwords, OAuth tokens, and ssh keys. Storing confidential information in a Secret is safer and more flexible than putting it verbatim in a Pod definition or in a container image.
Natively, Kubernetes uses secrets to handle objects that store sensitive data and it's authenticated by kubernetes-api, keeping it safe from external access unless it have a valid credential to cluster administration.
By default Jenkins stores the password in Secrets.
Deployment:
Addressing your Questions:
how do I secure and manage jenkins secret?
Any help or suggestion will be greatly appreciated to make this more secure
If I can help you further let me know in the comments!
Upvotes: 2