Interview Prep/Jenkins/Integrations & delivery

Developers want to deploy to Kubernetes from Jenkins, but security does not want cluster-admin kubeconfigs in Jenkins. What do you propose?

AdvancedScenarioIntegrations & delivery
Answer

Situation read → Reduce or remove cluster credentials in CI.

What I'd do →

  1. Preferred: GitOps. Jenkins builds, scans, pushes and then commits the new tag to a config repo (or opens a PR for prod); Argo CD in the cluster pulls and applies.
  2. If push-based is required: per-namespace service accounts with edit RoleBindings only in target namespaces, used by deploy pod templates (in-cluster) or short-lived tokens (kubectl create token deployer --duration=15m issued by an automation).
  3. No cluster-admin anywhere in Jenkins.

Why → GitOps keeps cluster credentials inside the cluster and adds drift correction.

Interview tip → Explain the Jenkins role becomes "CI and promotion", Argo CD does "CD".

All Jenkins questions Roadmap: Jenkins

More on Integrations & delivery