curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | sudo tee /usr/share/keyrings/helm.gpg > /dev/null
sudo apt-get install apt-transport-https --yes
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/helm.gpg] https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list
sudo apt-get update
sudo apt-get install helm
kubectl create namespace jenkins --dry-run=client -o yaml | kubectl apply -f -
kubectl apply -f jenkins-sa.yaml
RBAC access to the cluster.
If want to add more plugins in jenkins-values.yaml
deploy-jenkins/jenkins-values.yaml
Lines 241 to 248 in bdbbdf7
helm repo add jenkinsci https://charts.jenkins.io
helm repo update
helm install jenkins -n jenkins -f jenkins-values.yaml jenkinsci/jenkins
Jenkins default username "admin". After installed with helm, wait the jenkins pods to the running state.
jsonpath="{.data.jenkins-admin-password}"
secret=$(kubectl get secret -n jenkins jenkins -o jsonpath=$jsonpath)
echo $(echo $secret | base64 --decode)
JENKINS_IP=$(kubectl get svc --selector=app.kubernetes.io/name=jenkins -n jenkins -o jsonpath="{.items[0].status.loadBalancer.ingress[0].ip}")
echo "Jenkins URL http://$JENKINS_IP"
Pass the environment variable to deploy jenkins in the desire AKS.
- ARM_CLIENT_ID
- ARM_CLIENT_SECRET
- ARM_SUBSCRIPTION_ID
- ARM_TENANT_ID
- AZURE_CREDENTIALS
- RESOURCE_GROUP
- CLUSTER_NAME