Read the detailed README at docker-compose/README.md
cd docker-compose
docker-compose up -d
# Bring up all kong components with configuration
deck sync --headers "Kong-Admin-Token:password"
# Dump kong config
deck dump --headers "Kong-Admin-Token:password"
- GitHub workflow brings up the kong environment with docker-compose.
- Run decK sync against the docker compose environment brought up earlier (Ideally, it would point to the actual kong instance's Admin API)
Read the detailed README at kubernetes/README.md
# Create cluster
eksctl create cluster -f eks-config.yaml # Or create/use any k8s cluster
# Install kong
helm repo add kong https://charts.konghq.com
helm repo update
helm install kong kong/kong -n kong --create-namespace
# Install Kong components, k8s services, ingress
# Replace the host with the loadbalancer IP of kong-proxy
kubectl apply -f kubernetes/
curl -s https://fluxcd.io/install.sh | sudo bash
- Create an empty private github repository(flux-infra)
- Create a PAT token with access to contents, deploy keys for the above created repository
- Store the PAT token as an environment variable -
GITHUB_TOKEN
- Store the GitHub username as
GITHUB_USER
flux bootstrap github \
--owner=$GITHUB_USER \
--repository=flux-infra \
--branch=main \
--personal
- Create an SSH key pair using
ssh-keygen -t ed25519 -C "[email protected]"
- Create a deploy key in the
kong-assessment
repository with the above created public key with read only access
- Create a secret for the git repository -
flux create secret git kong-assessment-auth \
--url=ssh://[email protected]/$GITHUB_USER/kong-assessment \
--private-key-file=./id_ed25519 # This private key is the private key created in the previous section
- Create a file
kong-assessment-flux.yaml
with the following contents and check it into the flux-infra repository -
---
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: GitRepository
metadata:
name: kong-assessment
namespace: flux-system
spec:
interval: 1m0s
ref:
branch: main
secretRef:
name: kong-assessment-auth
url: ssh://[email protected]/avinashupadhya99/kong-assessment
---
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
kind: Kustomization
metadata:
name: kong-assessment
namespace: flux-system
spec:
interval: 10m0s
path: ./
prune: true
sourceRef:
kind: GitRepository
name: kong-assessment