An open API service indexing awesome lists of open source software.

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

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
![Crossplane Function Health Monitoring](docs/assets/arch.png)

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

### Active/Passive Cluster Policies
![Active/Passive Cluster Policies](https://www.k8gb.io/examples/crossplane/globalapp/assets/active-passive-cluster-policies.png)

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 <