{"id":26484312,"url":"https://github.com/illimanijavier/jenkins","last_synced_at":"2026-04-05T20:38:52.262Z","repository":{"id":283162336,"uuid":"943471488","full_name":"illimaniJavier/jenkins","owner":"illimaniJavier","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-15T19:08:48.000Z","size":63,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T21:47:34.184Z","etag":null,"topics":["cloud","devops","docker","jenkins"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/illimaniJavier.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-05T18:58:31.000Z","updated_at":"2025-03-15T19:21:13.000Z","dependencies_parsed_at":"2025-03-18T21:47:35.624Z","dependency_job_id":"fe1807d0-2d69-4db9-ba5d-6b4533a081dd","html_url":"https://github.com/illimaniJavier/jenkins","commit_stats":null,"previous_names":["illimanijavier/jenkins"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/illimaniJavier%2Fjenkins","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/illimaniJavier%2Fjenkins/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/illimaniJavier%2Fjenkins/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/illimaniJavier%2Fjenkins/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/illimaniJavier","download_url":"https://codeload.github.com/illimaniJavier/jenkins/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244555030,"owners_count":20471343,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloud","devops","docker","jenkins"],"created_at":"2025-03-20T05:22:20.277Z","updated_at":"2025-12-31T00:07:57.772Z","avatar_url":"https://github.com/illimaniJavier.png","language":null,"readme":"# Jenkins on Kubernetes\n\nA production-ready deployment of Jenkins CI/CD server on Kubernetes using Kustomize for configuration management.\n\n![Jenkins Logo](https://www.jenkins.io/images/logos/jenkins/256.png)\n\n## 🚀 Features\n\n- **Scalable**: Runs on Kubernetes for high availability\n- **Persistent**: Configured with persistent storage to maintain state\n- **Secure**: Preconfigured with best security practices\n- **Customizable**: Uses Kustomize for environment-specific configurations\n- **Ingress Ready**: Includes ingress configuration for easy access\n\n## 🏗️ Architecture\n\nThis deployment uses:\n- Jenkins master deployment with configurable resources\n- Persistent volume claims for durability\n- Kubernetes Service for network access\n- Ingress configuration for external access\n- Kustomize overlays for environment-specific configurations\n\n## 📋 Prerequisites\n\n- Kubernetes cluster (v1.25+)\n- kubectl configured to communicate with your cluster\n- Kustomize (v4.0+)\n- Storage class available in your cluster\n\n\n## 🔧 Installation\n\n### 1. Namespace Setup\n\nCreate the Jenkins namespace first:\n\n```bash\nkubectl create namespace jenkins\n```\n\n### 2. Clone the Repository\n\n```bash\ngit clone https://github.com/illimaniJavier/jenkins.git\ncd jenkins\n```\n\n### 3. Jenkins User Setup\n\nThis deployment requires a Jenkins user on your host system for proper permissions:\n\n```bash\n# Create the Jenkins user\nsudo adduser jenkins\n\n# Verify the user's UID and GID\nid jenkins\n```\n   \nYou should see output like:\n```\nuid=1004(jenkins) gid=1004(jenkins) groups=1004(jenkins),100(users)\n```\n\nNow update your deployment.yaml with your Jenkins user's UID/GID:\n```yaml\nsecurityContext:\n  fsGroup: 1004  # Replace with YOUR jenkins user's GID\n  runAsUser: 1004  # Replace with YOUR jenkins user's UID\n  runAsNonRoot: true\n```\n\n### 4. Ingress Configuration for DNS\n\nThe Ingress configuration uses a placeholder domain `jenkins.example.com`. \n**You must replace this with your actual domain before deploying:**\n\n```yaml\n# In base/ingress.yaml\nspec: \n  rules:\n    - host: jenkins.example.com  # Replace with your domain\n```\n\n### 5. Deploy Using Kustomize\n\n```bash\nkubectl apply -k overlays/dev/\n```\n\n\n## 🔍 Verification\n\nVerify your deployment is running correctly:\n\n```bash\n# Check if pods are running\nkubectl get pods -n jenkins\n\n# Check the service\nkubectl get svc -n jenkins\n\n# Check the ingress\nkubectl get ingress -n jenkins\n```\n\n## ⚠️ Troubleshooting\n\n### Permission Issues\n\nIf Jenkins fails to start or you see permission errors in the logs:\n\n1. **Verify user setup**:\n   ```bash\n   id jenkins\n   ```\n\n2. **Check directory permissions**:\n   ```bash\n   ls -la /home/jenkins/\n   ```\n\n3. **Ensure values match** in your deployment.yaml:\n   ```yaml\n   securityContext:\n     fsGroup: YOUR_JENKINS_GID\n     runAsUser: YOUR_JENKINS_UID\n   ```\n\n4. **Check pod status and events**:\n   ```bash\n   kubectl describe pod -n jenkins -l app=jenkins\n   ```\n\n## 🔍 Environment Details\n\nThis deployment has been successfully tested with the following environment:\n\n```bash\n$ kubectl version\nClient Version: v1.31.4+k3s1\nKustomize Version: v5.4.2\nServer Version: v1.31.4+k3s1\n```\n\n## 🌐 Post-Installation Environment\n\nUpon successful deployment, you'll have access to a fully configured Jenkins instance. The initial admin password is automatically generated during the first startup.\n\n### Accessing Jenkins\n\n1. Navigate to your configured domain (e.g., `https://jenkins.example.com`.\n\n2. You'll be presented with the Jenkins unlock screen as shown below:\n\n   ![Jenkins Unlock Screen](./assets/images/jenkins-getting-started.png)\n\n3. Retrieve the initial admin password:\n   ```bash\n   kubectl exec -n jenkins $(kubectl get pods -n jenkins -l app=jenkins -o jsonpath='{.items[0].metadata.name}') -- cat /var/jenkins_home/secrets/initialAdminPassword\n   ```\n\n4. Enter the password to unlock Jenkins and proceed with the setup wizard to:\n   - Install recommended plugins or select specific plugins\n   - Create your first admin user\n   - Configure the Jenkins URL\n\n### Initial System Configuration\n\nAfter installation, consider implementing these best practices:\n\n- Configure proper backup solutions for the Jenkins home directory\n- Set up CI/CD pipelines using Jenkins Pipeline or Multibranch Pipeline jobs\n- Implement Jenkins Configuration as Code (JCasC) for reproducible configurations\n- Connect your source code repositories (GitHub, GitLab, etc.)\n- Configure build agents for distributed workloads\n\nThe deployed environment provides a solid foundation for implementing enterprise-grade CI/CD workflows with proper security and scalability considerations.\n\n## 📄 License\n\nMIT\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fillimanijavier%2Fjenkins","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fillimanijavier%2Fjenkins","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fillimanijavier%2Fjenkins/lists"}