1
0
Fork 0
kubernetes/jenkins
Dustin 16dec1cdec ssh-host-keys: Do not specify a namespace
We don't want to hard-code a namespace for the `ssh-known-hosts`
ConfigMap because that makes it less useful for other projects besides
Jenkins.  Instead, we omit the namespace specification and allow
consumers to specify their own.

The _jenkins_ project doesn't have a default namespace, since it
specifies resources in the `jenkins` and `jenkins-jobs` namespaces, we
need to create a sub-project to set the namespace for the
`ssh-known-hosts` ConfigMap.
2025-07-21 11:47:39 -05:00
..
ssh-host-keys ssh-host-keys: Do not specify a namespace 2025-07-21 11:47:39 -05:00
.gitignore jenkins: Migrate to iSCSI persistent volume 2024-06-23 09:53:15 -05:00
README.md jenkins: Migrate to iSCSI persistent volume 2024-06-23 09:53:15 -05:00
gentoo-storage.yaml jenkins: Add storage for Gentoo Portage/binpkgs 2025-01-09 20:15:46 -06:00
iscsi-migrate.yaml jenkins: Migrate to iSCSI persistent volume 2024-06-23 09:53:15 -05:00
iscsi.yaml jenkins: Force iSCSI volume on specific nodes 2024-06-26 18:29:49 -05:00
jenkins.yaml jenkins: Update to 2.426.2 2024-01-22 18:01:03 -06:00
kustomization.yaml ssh-host-keys: Do not specify a namespace 2025-07-21 11:47:39 -05:00
secrets.yaml jenkins: Add credentials to sign, publish RPMs 2023-11-10 15:31:55 -06:00

README.md

Jenkins in Kubernetes

Kubernetes Setup

Configure Jenkins resources:

ln imagepull-gitea jenkins/.dockerconfigjson
kubectl apply -k jenkins

Jenkins Setup

Install Kubernetes plugin.

Set TCP port for inbound agents setting (Manage JenkinsConfigure Global Security) to Fixed and enter 40414.

Configure Kubernetes (Manage JenkinsManage Nodes and CloudsConfigure Clouds:

  1. Add a new cloudKubernetes
  2. Enter a name
  3. Kubernetes Cloud details...
    • Kubernetes URL: (leave blank; will use Kubernetes service discovery)
    • Kubernetes Namespace: jenkins-jobs
    • Credentials: - none - (will use Service Account token)
    • Jenkins tunnel: jenkins.jenkins.svc.cluster.local: (trailing colon!)

iSCSI Persistent Volume

Because of the large size of the Jenkins volume, it does not work well managed by Longhorn. Instead, we use a pre-provisioned iSCSI volume on the Synology NAS. This improves performance and avoids keeping multiple replicas of the Jenkins data, while still benefiting from snapshots, etc.