This is sample kubernetes installation for jenkins.
- Jenkins installed on kubernetes
- Ingress(traefik) to jenkins namespace
- Secure connection (https) to your jenkins namespace using Let's Encrypt
I am using k3s for testing this repo, as you know, k3s has built-in ingress (traefik), if you don't have ingress, please install first
- Clone repo
git clone https://github.com/ludesdeveloper/jenkins-kubernetes-lets-encrypt.git
- Change directory
cd jenkins-kubernetes-lets-encrypt
- Create namespace
kubectl create namespace jenkins
- Install operator dependencies
kubectl apply -f operator/
- Install jenkins operator
helm repo add jenkinsci https://charts.jenkins.io
helm repo update
- Jenkins objects
helm install jenkins-objects ./jenkins-objects -n jenkins
- Create jenkins instance
chart=jenkinsci/jenkins
helm install jenkins -n jenkins -f jenkins-values.yaml $chart
- Install ingress, please change with your ingress controller ip address
I am using nip.io for dns
helm install ingress ./ingress --set nipIPAddress=111-111-111-111
- Get jenkins password
jsonpath="{.data.jenkins-admin-password}"
secret=$(kubectl get secret -n jenkins jenkins -o jsonpath=$jsonpath)
echo $(echo $secret | base64 --decode)