{"id":22126367,"url":"https://github.com/birkneralex/openshift-homelab","last_synced_at":"2026-06-13T03:34:31.354Z","repository":{"id":227969347,"uuid":"772792420","full_name":"BirknerAlex/openshift-homelab","owner":"BirknerAlex","description":"Running OpenShift in a Homelab","archived":false,"fork":false,"pushed_at":"2025-11-17T20:28:27.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-17T22:17:18.506Z","etag":null,"topics":["homelab","k8s-cluster","kubernetes-cluster","openshift","openshift-installation","openshift4"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BirknerAlex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2024-03-15T23:03:40.000Z","updated_at":"2025-11-17T20:27:00.000Z","dependencies_parsed_at":"2024-03-16T03:29:52.299Z","dependency_job_id":"71bfae46-57a4-44d8-a9bc-43ada099d912","html_url":"https://github.com/BirknerAlex/openshift-homelab","commit_stats":null,"previous_names":["birkneralex/openshift-homelab"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/BirknerAlex/openshift-homelab","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BirknerAlex%2Fopenshift-homelab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BirknerAlex%2Fopenshift-homelab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BirknerAlex%2Fopenshift-homelab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BirknerAlex%2Fopenshift-homelab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BirknerAlex","download_url":"https://codeload.github.com/BirknerAlex/openshift-homelab/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BirknerAlex%2Fopenshift-homelab/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34271500,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["homelab","k8s-cluster","kubernetes-cluster","openshift","openshift-installation","openshift4"],"created_at":"2024-12-01T16:55:45.065Z","updated_at":"2026-06-13T03:34:31.348Z","avatar_url":"https://github.com/BirknerAlex.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# openshift-homelab\n[![.github/workflows/build.yml](https://github.com/BirknerAlex/openshift-homelab/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/BirknerAlex/openshift-homelab/actions/workflows/build.yml)\n\nThis project helps you to create an OpenShift single node cluster iso file for your homelab.\n\n### Prerequisites\n\n- Docker installed on your local machine to create the OpenShift cluster iso file\n- DHCP running on your local network, which is required for the OpenShift cluster to work\n- DNS running on your local network, which is required for the OpenShift cluster to work\n\n### OpenShift Hardware Requirements\n\n- 8 vCPU cores\n- 32GB of RAM\n- 120GB of disk space\n- Optional: Additional disks for LVM local storage \n\n### Pull Secret\n\nYou need a Red Hat pull secret to pull the OpenShift images.\nYou can create one for free by following the instructions [here](https://console.redhat.com/openshift/install/pull-secret).\n\n# Usage\n\n1. Create .env file with the following content and adjust the values to your environment:\n\n```bash\n# Your SSH public key, which is used to access the OpenShift cluster with the core user via SSH\nHOMELAB_SSH_KEY=your-ssh-public-key\n# Your Red Hat pull secret, which is used to pull the OpenShift images\nHOMELAB_PULL_SECRET=your-pull-secret\n# Your domain, which is used to create the DNS records for the OpenShift cluster\nHOMELAB_CLUSTER_DOMAIN=your-domain\n# Your cluster name, which is used to create the DNS records for the OpenShift cluster\nHOMELAB_CLUSTER_NAME=your-cluster-name\n# Your network CIDR, which is used to create the DHCP configuration for the OpenShift cluster,\n# Ensure that the network CIDR that is used on your homelab DHCP server.\nHOMELAB_CIDR=192.168.1.0/24\n# THe path to the disk, which is used to install the OpenShift cluster.\nHOMELAB_INSTALL_DISK=/dev/vda\n# Optionally: Enable IPv6 for the OpenShift cluster\nHOMELAB_CIDR_IPV6=2001:db8::/32\n```\n\n2. Run the following Docker container to create the OpenShift cluster iso file:\n\n```bash\ncurl -L https://raw.githubusercontent.com/BirknerAlex/openshift-homelab/main/bootstrap.sh | bash \n```\n\n3. Create the DNS records for the OpenShift cluster. The following DNS records are required:\n\n```\napi.your-cluster-name.your-domain\napi-int.your-cluster-name.your-domain\n*.apps.your-cluster-name.your-domain\n```\n\n4. Ensure static IP DHCP configuration for your OpenShift cluster\n5. Boot homelab node with the created iso file, ensure DNS and DHCP are configured correctly\n6. Access the OpenShift cluster with the web console, the installation can take a while. A loooong while\n\n\u003e **Note for germans**: The installation can take a loooong while. A loooong while. #Neuland\n\n# Post Installation\n\n## Let's Encrypt Cert Manager\n\nIn this example we are going to use CloudFlare as DNS provider for Let's Encrypt.\n\n1. Install cert-manager Operator from OperatorHub\n\n- Update channel: stable\n- Installation mode: All namespaces on cluster (default)\n- Installed Namespace: openshift-operators\n- Update approval: Automatic\n\n2. Create Secret with Let's Encrypt account key\n\n```yaml\napiVersion: v1\nkind: Secret\nmetadata:\n  name: cloudflare-api-token-secret\n  namespace: openshift-operators\ntype: Opaque\nstringData:\n  api-token: XXXXXXXXXXXXXXXXXX\n```\n\n3. Create ClusterIssuer\n\n```yaml\napiVersion: cert-manager.io/v1\nkind: ClusterIssuer\nmetadata:\n  name: letsencrypt\n  namespace: openshift-operators\nspec:\n  acme:\n    email: \u003cyour-email\u003e\n    privateKeySecretRef:\n      name: letsencrypt\n    server: 'https://acme-v02.api.letsencrypt.org/directory'\n    solvers:\n      - dns01:\n          cloudflare:\n            apiTokenSecretRef:\n              name: cloudflare-api-token-secret\n              key: api-token\n```\n\n## OpenShift Router Certificate\n\n1. Create Ingress Certificate\n\n```yaml\napiVersion: cert-manager.io/v1\nkind: Certificate\nmetadata:\n  name: default-ingress-tls\n  namespace: openshift-ingress\nspec:\n  secretName: default-ingress-tls\n  dnsNames:\n    - apps.your-cluster-name.your-domain\n    - \"*.apps.your-cluster-name.your-domain\"\n  issuerRef:\n    name: letsencrypt\n    kind: ClusterIssuer\n    group: cert-manager.io\n```\n\n2. Patch Ingress Controller\n\n```bash\noc patch ingresscontroller.operator default --type=merge -p '{\"spec\":{\"defaultCertificate\": {\"name\": \"default-ingress-tls\"}}}' -n openshift-ingress-operator\n```\n\nYou should receive `ingresscontroller.operator.openshift.io/default patched` as response. This takes a while now.\n\n## API certificate\n\nWe also want to have a valid certificate for the API endpoint.\n\n1. Create API Certificate\n\n```yaml\napiVersion: cert-manager.io/v1\nkind: Certificate\nmetadata:\n  name: api-ingress-tls\n  namespace: openshift-config\nspec:\n  secretName: api-ingress-tls\n  dnsNames:\n    - api.your-cluster-name.your-domain\n  issuerRef:\n    name: letsencrypt\n    kind: ClusterIssuer\n    group: cert-manager.io\n```\n \n2. Patch API Server Configuration\n\n```bash\noc patch apiserver cluster \\\n     --type=merge -p \\\n     '{\"spec\":{\"servingCerts\": {\"namedCertificates\":\n     [{\"names\": [\"api.your-cluster-name.your-domain\"], \n     \"servingCertificate\": {\"name\": \"api-ingress-tls\"}}]}}}' \n```\n\nYou should receive `apiserver.config.openshift.io/cluster patched` as response. This takes a while now.\n\n## LVM Local Storage\n\n1. Install LVM Storage Operator from OperatorHub\n\n- Update channel: stable\n- Installation mode: A specific namespace on the cluster\n- Installed Namespace: openshift-operators\n- Update approval: Automatic\n\n2. Create Storage Cluster\n\nIn this case I have added 2 additional disks to the homelab node, \nwhich are used for LVM local storage. `vdb` is a SSD and `vdc` is a HDD.\n\nThe `ssd` device class will be set as default storage class for the cluster.\n\n```yaml\napiVersion: lvm.topolvm.io/v1alpha1\nkind: LVMCluster\nmetadata:\n  name: lvm-cluster\n  namespace: openshift-storage\nspec:\n  storage:\n    deviceClasses:\n      - name: ssd\n        default: true\n        deviceSelector: \n          paths:\n            - /dev/vdb\n        thinPoolConfig:\n          name: thin-pool-ssd\n          overprovisionRatio: 10\n          sizePercent: 90\n      - name: hdd\n        deviceSelector: \n          paths:\n            - /dev/vdc\n        thinPoolConfig:\n          name: thin-pool-hdd\n          overprovisionRatio: 10\n          sizePercent: 90\n```\n\n## Optional: Persistent storage for Monitoring\n\nOnce the LVM local storage is configured, you can adjust the storage class for the OpenShift monitoring components.\n\n```yaml\napiVersion: v1\nkind: ConfigMap\nmetadata:\n  name: cluster-monitoring-config\n  namespace: openshift-monitoring\ndata:\n  config.yaml: |\n    prometheusK8s:\n      volumeClaimTemplate:\n        spec:\n          storageClassName: lvms-hdd\n          resources:\n            requests:\n              storage: 40Gi\n    alertmanagerMain:\n      volumeClaimTemplate:\n        spec:\n          storageClassName: lvms-hdd\n          resources:\n            requests:\n              storage: 10Gi\n```\n\n### Notice\n\nIf your disk contains data, partitions or labels, lvm operator will not be able to use it.\nRun this on the OpenShift node as `root` to remove all partitions and labels:\n\n```bash\nsgdisk -Z /dev/vdX\nblkdiscard /dev/vdX\nblockdev --rereadpt /dev/vdX\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbirkneralex%2Fopenshift-homelab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbirkneralex%2Fopenshift-homelab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbirkneralex%2Fopenshift-homelab/lists"}