https://github.com/upbound/configuration-k8gb-bluegreen
Global Blue/Green Deployments with Upbound Crossplane and k8gb
https://github.com/upbound/configuration-k8gb-bluegreen
Last synced: 4 months ago
JSON representation
Global Blue/Green Deployments with Upbound Crossplane and k8gb
- Host: GitHub
- URL: https://github.com/upbound/configuration-k8gb-bluegreen
- Owner: upbound
- License: apache-2.0
- Created: 2025-09-02T23:17:45.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2026-01-30T19:06:43.000Z (6 months ago)
- Last Synced: 2026-01-31T11:52:58.647Z (6 months ago)
- Language: AMPL
- Homepage:
- Size: 790 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Global Blue/Green Deployments with Upbound Crossplane and k8gb
An Upbound DevX configuration package that enables global blue/green deployments across geographically distributed Kubernetes clusters using k8gb. This configuration provides automatic active/passive cluster switching with Azure infrastructure and intelligent GSLB health monitoring.
## Architecture
### Multi-Cluster Overview
```
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Cluster A │ │ Cluster B │ │ Cluster C │
│ (Primary EU) │ │ (Secondary US) │ │ (Secondary CN) │
├─────────────────┤ ├─────────────────┤ ├─────────────────┤
│ GlobalApp XR │ │ GlobalApp XR │ │ GlobalApp XR │
│ ├─Azure RG │ │ ├─Azure RG │ │ ├─Azure RG │
│ ├─Redis Cache │ │ ├─Redis Cache │ │ ├─Redis Cache │
│ ├─Podinfo App │ │ ├─Podinfo App │ │ ├─Podinfo App │
│ └─k8gb GSLB │ │ └─k8gb GSLB │ │ └─k8gb GSLB │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ │ │
└───────────────────────┼───────────────────────┘
│
┌─────────────────┐
│ DNS/GSLB │
│ Traffic Routing │
└─────────────────┘
```
### Global Blue/Green Health Monitoring

The configuration uses intelligent health monitoring to automatically detect cluster health and recommend policy changes for seamless blue/green switching.
### Active/Passive Cluster Policies

Automatic policy management enables hands-off blue/green deployments where unhealthy clusters are automatically moved to "Observe" mode while healthy clusters receive traffic.
## Features
- **Global Blue/Green**: Automatic active/passive cluster switching based on health
- **Azure Infrastructure**: Resource Groups and Redis Cache for application state
- **Application Deployment**: Podinfo with k8gb integration via Helm
- **GSLB Health Monitoring**: Intelligent traffic routing and failover
- **Upbound DevX**: Modern embedded functions with KCL-based composition logic
- **Auto-Policy Management**: Hands-off blue/green switching with policy automation
- **Crossplane v2**: Compatible with namespace-scoped `.m.upbound.io` resources
## Prerequisites
### k8gb Installation Required
**Important**: k8gb must be pre-installed on your Kubernetes clusters for proper GSLB functionality. This configuration creates k8gb `Gslb` resources but does not install the k8gb operator itself.
```bash
# Install k8gb using Helm
helm repo add k8gb https://www.k8gb.io
helm install k8gb k8gb/k8gb --namespace k8gb --create-namespace
```
See [k8gb installation guide](https://www.k8gb.io/docs/install.html) for detailed setup instructions.
### Other Dependencies
- **Crossplane** >= v2 with v2 composition mode
- **Azure credentials** configured as Kubernetes secrets
- **DNS delegation** configured for k8gb domains
- **Ingress controller** (nginx recommended)
## Installation
1. **Install the configuration**:
```bash
kubectl apply -f - < azure-credentials.json <