Skip to content

Commit

Permalink
updated jenkins.md
Browse files Browse the repository at this point in the history
  • Loading branch information
HariSekhon committed Feb 29, 2024
1 parent 17f1d11 commit a97f8fc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion jenkins.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,21 @@ Then recover the initial admin password to log in:
kubectl get secret -n jenkins jenkins -o jsonpath="{.data.jenkins-admin-password}" | base64 --decode
```

If you've pruned in ArgoCD or otherwise lost the `jenkins` secret that JCasC uses, you can recreate it like this:
If you've lost the above `jenkins` secret that JCasC uses (perhaps because ArgoCD pruned it) you can
recreate it like this:

```shell
kubectl create secret generic -n jenkins jenkins \
--from-literal=jenkins-admin-user="admin"
--from-literal=jenkins-admin-password="$(pwgen -s 20 -c 1)"
```

then restart Jenkins again for JCasC to reset Jenkins to this new password:

```shell
kubectl rollout restart sts jenkins
```

## CloudBees

Managed hosted Jenkins control plane - commercial proprietary management layer.
Expand Down

0 comments on commit a97f8fc

Please sign in to comment.