1
0
Fork 0

Add generate-keys.sh script for SSL and JWT key generation and update examples

- Added `generate-keys.sh` script to automate the generation of SSL certificates and JWT keys for testing.
- Updated examples and documentation across Docker, Kubernetes, Swarm, and static directories to include instructions for running the script.
- Removed hardcoded .pem files and replaced with dynamically generated keys and certificates.
- Emphasized testing-only usage of self-signed certificates.
This commit is contained in:
Joao Gilberto Magalhaes 2025-12-02 12:28:22 -05:00
parent d3149637b4
commit 3a4b428e46
10 changed files with 162 additions and 317 deletions

View file

@ -4,13 +4,26 @@ This directory contains Kubernetes manifest examples demonstrating EasyHAProxy i
## Prerequisites
1. **EasyHAProxy installed in your cluster:**
1. **Generate SSL Certificates (Required for TLS examples):**
```bash
# From the repository root
./examples/generate-keys.sh
```
This script automatically generates:
- SSL certificates for testing (host1.local, host2.local)
- JWT keys for authentication examples
- All other .pem files needed for examples
**Note:** These are self-signed certificates for testing only. For production, use Let's Encrypt or your own certificates.
2. **EasyHAProxy installed in your cluster:**
```bash
kubectl create namespace easyhaproxy
kubectl apply -f https://raw.githubusercontent.com/byjg/docker-easy-haproxy/4.6.0/deploy/kubernetes/easyhaproxy-daemonset.yml
```
2. **Label the node where EasyHAProxy will run:**
3. **Label the node where EasyHAProxy will run:**
```bash
kubectl label nodes <node-name> "easyhaproxy/node=master"
```