You lost the Jenkins admin password. How do you recover it?
Quick Answer
For a fresh install, read the initial admin password from the pod/host (/var/jenkins_home/secrets/initialAdminPassword). Otherwise reset it via another admin account, edit config to disable security temporarily, or restore from backup.
Detailed Answer
If you are still on first-run setup, kubectl exec into the controller and cat the initialAdminPassword file. For an established instance, options are: log in as another admin and reset, or (carefully) set useSecurity to false in config.xml / disable the security realm, restart, and re-add a user, then re-enable security. Best prevention is regular backups of JENKINS_HOME and an external identity provider (LDAP/SSO).
Code Example
kubectl exec -it <jenkins-pod> -- cat /var/jenkins_home/secrets/initialAdminPassword
Interview Tip
Give the initialAdminPassword path for fresh installs and note the real fix is SSO + JENKINS_HOME backups so it cannot happen.