Skip to content

Vikaspogu/openshift-multicluster

Repository files navigation

Multi-Cluster OpenShift Management with GitOps

Red Hat Logo ArgoCD Logo

Enterprise-grade multi-cluster OpenShift management using ArgoCD and GitOps principles

OpenShift ArgoCD Helm Kustomize


πŸ“‹ Table of Contents

πŸ“– Overview

This repository provides a production-ready, declarative approach to managing multiple OpenShift clusters using GitOps principles with ArgoCD. It enables:

βœ… Multi-cluster orchestration with Red Hat Advanced Cluster Management (ACM)
βœ… Consistent configuration across development, staging, and production environments
βœ… Automated deployments and synchronization using ArgoCD
βœ… Secure secret management with External Secrets Operator and 1Password
βœ… Infrastructure as Code with Helm charts and Kustomize overlays
βœ… Policy-based governance and compliance automation

πŸ’‘ This setup follows the GitOps Standards Repository Template from Red Hat Communities of Practice.

πŸ—οΈ Architecture

graph TB
    subgraph "Management Hub Cluster"
        ACM[Red Hat ACM]
        ArgoCD[ArgoCD GitOps]
        Vault[HashiCorp Vault]
        ESO[External Secrets Operator]
    end

    subgraph "Target Clusters"
        Proxmox[Proxmox Cluster]
        VSphere[vSphere Cluster]
        HCP[Hosted Control Planes]
    end

    subgraph "GitOps Repository"
        Components[Components]
        Clusters[Cluster Configs]
        Helm[Helm Charts]
        Policies[ACM Policies]
    end

    ArgoCD --> Components
    ArgoCD --> Clusters
    ArgoCD --> Helm
    ACM --> Policies
    ACM --> Proxmox
    ACM --> VSphere
    ACM --> HCP
    ESO --> Vault

    style ACM fill:#e1f5fe
    style ArgoCD fill:#f3e5f5
    style Vault fill:#fff3e0
Loading

Key Components

  • 🎯 ArgoCD: Continuous deployment and GitOps orchestration
  • 🌐 Red Hat ACM: Multi-cluster management and governance
  • πŸ” External Secrets: Secure secret injection from external systems
  • πŸ“œ Cert Manager: Automated TLS certificate management
  • πŸ”§ Operators: 50+ OpenShift operators for various capabilities
  • πŸ“Š Observability: Integrated monitoring, logging, and alerting

πŸš€ Quick Start

Prerequisites

Tool Version Download Link Purpose
OpenShift Cluster 4.12+ - Target deployment environment with cluster-admin privileges
oc CLI Latest Download OpenShift command-line interface
openshift-install Latest Download Cluster installation tool
Helm 3.12+ Download Package manager for Kubernetes
Kustomize 5.3+ Download Configuration management tool
Git Access - - Repository access and credentials

System Requirements

  • CPU: 4+ cores per control plane node
  • Memory: 16GB+ RAM per control plane node
  • Storage: 100GB+ available disk space
  • Network: Stable internet connection for image pulls

1. Deploy OpenShift Cluster

Step 1: Clone Repository

# Clone the repository
git clone https://github.com/Vikaspogu/openshift-multicluster.git
cd openshift-multicluster

Step 2: Configure Installation Files

a. Update installer/proxmox/install-config.yaml:

  • ✏️ Base Domain (e.g., cluster.example.com)
  • 🌐 Machine Network CIDR (e.g., 192.168.1.0/24)
  • πŸ“ API and Ingress VIPs
  • πŸ”‘ Pull secret and SSH Key

b. Update installer/proxmox/agent-config.yaml:

  • πŸ“‘ Rendezvous IP
  • πŸ”§ MacAddress, IP, DNS, Interfaces and Hostname for all hosts

Step 3: Generate Installation ISO

./openshift-install agent create image --dir installer/proxmox

Step 4: Deploy to Proxmox

  1. Upload the generated ISO to your Proxmox storage
  2. Create VMs using the ISO image
  3. Start all VMs to begin the installation process

Step 5: Monitor Installation Progress

# Wait for installation to complete
export KUBECONFIG=installer/proxmox/auth/kubeconfig
./openshift-install agent wait-for install-complete --dir installer/proxmox --log-level=debug

2. Bootstrap GitOps

Update repoURL and path in the ArgoCD root application(App of Apps pattern) under components/root-application/

Update Repository URL: Modify the cluster configuration in clusters/<cluster-name>/kustomization.yaml:

helmCharts:
  - name: argocd-app-of-apps
    valuesInline:
      default:
        source:
          repoURL: https://github.com/YOUR-USERNAME/openshift-multicluster.git
          targetRevision: HEAD
        destination:
          server: https://kubernetes.default.svc

Customize for Your Environment:

  • Replace YOUR-USERNAME with your GitHub username
# Step 1: Login to your OpenShift cluster
oc login --server=https://api.cluster.example.com:6443

# Step 2: Bootstrap ArgoCD and initial applications
oc apply -k components/root-application/

# Step 3: Wait for ArgoCD to be ready (may take 2-3 minutes)
oc wait --for=condition=available deployment/openshift-gitops-server -n openshift-gitops --timeout=300s

# Step 4: Verify ArgoCD deployment
oc get applications -n openshift-gitops

# Step 5: Get ArgoCD admin password (optional)
oc extract secret/openshift-gitops-cluster -n openshift-gitops --to=-

⚠️ Note: Initial sync may take 5-10 minutes as operators are installed and configured.

πŸ“ Repository Structure

openshift-multicluster/
β”œβ”€β”€ apps/                    # Application-specific configurations
β”œβ”€β”€ clusters/                # Cluster-specific configurations
β”‚   β”œβ”€β”€ proxmox/            # Proxmox cluster configuration
β”‚   └── vsphere/            # vSphere cluster configuration
β”œβ”€β”€ components/             # Reusable component definitions
β”‚   β”œβ”€β”€ operators/          # OpenShift operators
β”‚   β”œβ”€β”€ configs/            # Configuration components
β”‚   └── charts/             # Custom Helm charts
β”œβ”€β”€ groups/                 # Common configurations by environment
β”‚   β”œβ”€β”€ all/                # Applied to all clusters
β”‚   └── dev/                # Development environment specific
β”œβ”€β”€ helm/charts/            # Custom Helm charts
β”œβ”€β”€ installer/              # Cluster installation files
└── scripts/                # Utility scripts

Configuration Hierarchy

  1. Groups (groups/) - Environment-wide defaults
  2. Clusters (clusters/) - Cluster-specific overrides
  3. Components (components/) - Individual service configurations
  4. Apps (apps/) - Application deployments

πŸŽ›οΈ Cluster Management

Supported Platforms

Platform Status Features
Proxmox βœ… Production VM management, storage integration
vSphere βœ… Production vCenter integration, DRS/HA support

Adding a New Cluster

  1. Create cluster directory:

    mkdir clusters/new-cluster
    cp clusters/proxmox/kustomization.yaml clusters/new-cluster/
  2. Customize configuration:

    # Edit cluster-specific values
    vim clusters/new-cluster/kustomization.yaml
  3. Deploy via ArgoCD:

    # ArgoCD will automatically detect and sync the new cluster
    oc get applications -n openshift-gitops

🧩 Components & Features

πŸ’­ Core Infrastructure

Component Purpose Status
πŸ”„ OpenShift GitOps ArgoCD for continuous deployment and application lifecycle management βœ… Production
🌐 Red Hat ACM Multi-cluster management hub with governance and policy enforcement βœ… Production
πŸ”’ External Secrets Secure secret injection from external systems (1Password, Vault, AWS) βœ… Production
πŸ“œ Cert Manager Automated TLS certificate management via Let's Encrypt and DNS providers βœ… Production
πŸ”§ Patch Operator Dynamic cluster configuration updates and resource patching βœ… Production

πŸ›‘οΈ Security & Compliance

Component Purpose Features
πŸ›‘οΈ Red Hat ACS Advanced Cluster Security for container and Kubernetes security Vulnerability scanning, policy enforcement, runtime protection
πŸ” LDAP Sync Automated user and group synchronization Active Directory integration, group mapping
πŸ”‘ OAuth External identity provider integration LDAP, OIDC, GitHub, Google authentication

πŸ’» Developer Experience

Component Purpose Benefits
πŸ—οΈ Developer Hub Internal developer platform based on Backstage Service catalog, documentation, templates
πŸ’» Dev Spaces Cloud-native development workspaces VS Code in browser, consistent dev environments
πŸš€ OpenShift Pipelines Tekton-based CI/CD with Pipeline-as-Code GitOps workflows, secure builds, multi-arch support
πŸ–₯️ Web Terminal Browser-based cluster access No local tools needed, instant access

πŸ’Ύ Storage & Data Management

Component Use Case Features
πŸ’Ύ LVM Storage Local volume management for persistent storage Dynamic provisioning, snapshot support
πŸ“Š CloudNative-PG PostgreSQL operator for cloud-native databases High availability, backup/restore, monitoring
πŸ”„ VolSync Volume replication and backup solutions Cross-cluster replication, disaster recovery
πŸ—„οΈ Synology CSI Network-attached storage integration NFS/iSCSI support, snapshot capabilities

πŸ“ˆ Observability Stack

Component Function Integration
πŸ“Š Alertmanager Alert routing, grouping, and management Slack, email, PagerDuty notifications
πŸ“‹ OpenShift Logging Centralized log aggregation and analysis Elasticsearch, Fluentd, Kibana stack
πŸ” Log Forwarder External log shipping configuration Splunk, external Elasticsearch, S3

🌐 Networking & Connectivity

Component Purpose Environment
βš–οΈ MetalLB Load balancer for bare-metal clusters On-premises, edge deployments
🌐 NMState Declarative network configuration management Static IPs, bonding, VLANs
☁️ Cloudflared Secure tunnel management without VPN Remote access, zero-trust networking

πŸ’» Development Environment

DevSpaces Setup

This repository includes a pre-configured development environment using OpenShift Dev Spaces:

# devfile.yaml
components:
  - name: dev-tools
    container:
      image: quay.io/rhn_gps_vpogu/devspaces-fedora40-tooling:2.0.0
      memoryLimit: 4Gi

Task Runner

Use the included Task runner for common operations:

# List all available tasks
task --list

# Example tasks (extend as needed)
task volsync:snapshot    # Create volume snapshots
task validate           # Validate YAML configurations
task test               # Run integration tests

πŸ”Œ ArgoCD Plugins and Usage

ArgoCD Lovely Plugin

The ArgoCD Lovely Plugin enhances Kustomize capabilities:

  • Environment Variable Substitution: Replace variables across multiple files
  • Dynamic Patching: Apply patches based on cluster context
  • Channel Management: Update operator channels dynamically

Examples

Operator Channel Patching:

# clusters/proxmox/cert-manager.yaml
spec:
  source:
    plugin:
      parameters:
        - name: channel
          value: "stable-v1.13"

Variable Replacement with sed:

parameters:
  - name: sed
    value: "s/CLUSTER_NAME/proxmox-cluster/g **/*.yaml"

YAML Path Updates with yq:

parameters:
  - name: yq
    value: '.spec.domain = "apps.cluster.example.com" ingress.yaml'

Custom Plugins

Additional plugins are configured in components/openshift-gitops-config/.

⭐ Stargazers

Star History Chart

⭐ If you find this project helpful, please consider giving it a star! ⭐


Made with ❀️ for the OpenShift community

Report Bug β€’ Request Feature

About

Multi-Cluster OpenShift - Deployed on Proxmox and Operated through Kustomize & ArgoCD

Topics

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •