How do you install Jenkins on Kubernetes in production?
IntermediateConceptPlugins, JCasC & Jenkins on Kubernetes
Answer
The official Helm chart (jenkins/jenkins from https://charts.jenkins.io) or the Jenkins Operator, or your own manifests. Essentials: a StatefulSet with one replica, a PersistentVolumeClaim for JENKINS_HOME, a custom controller image with pinned plugins, JCasC from a ConfigMap, secrets from a Secret or external store, a ServiceAccount with RBAC for agent pods, an Ingress with TLS, resource requests and limits, liveness and readiness probes on /login, and a backup job for the PVC.
helm repo add jenkins https://charts.jenkins.io && helm repo update
helm upgrade --install jenkins jenkins/jenkins -n jenkins --create-namespace -f values.yaml
More on Plugins, JCasC & Jenkins on Kubernetes
How do you manage plugins in a reproducible way?IntermediateWhat does `jenkins-plugin-cli` resolve for you, and what flags matter?IntermediateWhy should you keep the number of plugins low?BeginnerWhat is JCasC and how is it loaded?BeginnerWhat are the top-level root elements in a JCasC file?IntermediateHow do you inject secrets into JCasC without committing them?Advanced