Official Script
This guide describes how to use official scripts to install or upgrade Zadig on an existing Kubernetes cluster, suitable for enterprise production environments.
# Resource Preparation
- Kubernetes cluster version: v1.16+, recommended 8C16G, admin privileges
- Helm version: v3.5.0 or above
Tip
- If you use built-in storage components (MySQL/MongoDB/MinIO), configure the default StorageClass in Kubernetes for PVC persistence before installation
- Some cluster network plugins may prevent Service backend Pods from self-access; please verify in advance
- Configure kube-dns to ensure name-based addressing between services and Pods
# Installation
# Step 1: Prepare the Installation Environment
- A machine with network access to the cluster to execute the installation script
- kubectl(opens new window) installed with admin privileges
# Step 2: Download the Installation Script
Choose the script based on your scenario. All scripts are the same version; the difference is whether persistent storage is supported:
| Scenario | Download Source | Description |
|---|---|---|
| Quick Start | Official(opens new window) GitHub(opens new window) | No persistence, not for production |
| Production | Official(opens new window) GitHub(opens new window) | Supports persistence, recommended for production |
Download and add execute permission:
# Quick Start
curl -LO https://github.com/koderover/zadig/releases/download/v4.2.1/install_quickstart.sh
chmod +x ./install_quickstart.sh
# Production
curl -LO https://github.com/koderover/zadig/releases/download/v4.2.1/install.sh
chmod +x ./install.sh
1
2
3
4
5
6
7
2
3
4
5
6
7
Tip
The following environment variables are supported. Defaults are used if not set. Set them before running the script if needed.
# Example: set IP access address
export IP=<node external ip>
export PORT=<any port between 30000-32767>
1
2
3
2
3
| Variable Name | Default | Required | Description |
|---|---|---|---|
| NAMESPACE | zadig | No | Kubernetes namespace |
| DOMAIN | One of IP/DOMAIN | Domain for accessing Zadig (production script only, must resolve to gateway-proxy) | |
| IP | One of IP/DOMAIN | External IP of any cluster node for accessing Zadig | |
| PORT | Required if using IP | Any valid Kubernetes port (30000-32767) | |
| SERVICE_TYPE | NodePort | No | Gateway service type: NodePort/LoadBalancer, default NodePort |
| STORAGE_SIZE | 20G | No | Storage size for built-in DB and object storage |
| STORAGE_CLASS | No | Storage class for persistence (production script only) | |
| MONGO_URI | No | External MongoDB URI, escape multiple addresses (production script only) | |
| MONGO_DB | zadig | No | MongoDB database name (production script only) |
| MYSQL_HOST | No | External MySQL host (production script only) | |
| MYSQL_PORT | No | MySQL port (production script only) | |
| MYSQL_USERNAME | No | MySQL username (production script only) | |
| MYSQL_PASSWORD | No | MySQL password (production script only) | |
| ENCRYPTION_KEY | No | Data encryption key. Save after first install; set same value for reinstall to decrypt previous data |
# Step 3: Start Installation
# Quick Start
export IP=<IP>
export PORT=<valid port>
./install_quickstart.sh
1
2
3
2
3
# Production
Configure persistence and support for external HA MongoDB and MySQL:
Warning
Version requirements: MongoDB ≥ 4.4, MySQL ≥ 5.7
export IP=<IP>
export PORT=<valid port>
export EMAIL=example@koderover.com
export PASSWORD=zadig
# Configure HA MySQL, create dex and user databases in advance
export MYSQL_HOST=<MYSQL_HOST>
export MYSQL_PORT=<MYSQL_PORT>
1
2
3
4
5
6
7
2
3
4
5
6
7


