bouncer/misc/k8s
vfebvre e1d9acb980
Cadoles/bouncer/pipeline/pr-develop Build started... Details
fix[README]: Added --role writer in token authentication creation
2024-03-26 14:04:07 +01:00
..
kind fix(k8s): redis configuration 2024-03-26 14:04:07 +01:00
kustomization fix(k8s): redis configuration 2024-03-26 14:04:07 +01:00
README.md fix[README]: Added --role writer in token authentication creation 2024-03-26 14:04:07 +01:00

README.md

Kubernetes

Initialize your project

  1. Generate the Docker configuration to enable image builds with Kaniko and communicate with reg.cadoles.com

    docker login reg.cadoles.com
    mkdir -p misc/k8s/kustomization/base/secrets/dockerconfig
    docker --config misc/k8s/kustomization/base/secrets/dockerconfig login reg.cadoles.com
    mv misc/k8s/kustomization/base/secrets/dockerconfig/config.json misc/k8s/kustomization/base/secrets/dockerconfig/.dockerconfigjson
    mkdir -p misc/k8s/kustomization/overlays/dev/secrets/dockerconfig
    cp misc/k8s/kustomization/base/secrets/dockerconfig/.dockerconfigjson misc/k8s/kustomization/overlays/dev/secrets/dockerconfig/.dockerconfigjson
    

Getting started with Kind

  1. Create your Kind cluster

    kind create cluster --config misc/k8s/kind/bouncer-cluster.yaml
    
  2. Deploy required operators

    kubectl apply -k misc/k8s/kind/cluster --server-side
    
  3. Deploy your Bouncer development environment

    skaffold dev -p dev --cleanup=false --default-repo reg.cadoles.com/<YOUR_PERSONNAL_USER_NAME>
    

Testing

  1. Open shell in bouncer-admin pod

    kubectl exec -it -n bouncer-dev bouncer-admin-<suffix> -- /bin/sh
    
  2. Create an authentication token

    bouncer --config /etc/bouncer/config.yml auth create-token --role writer --subject $(whoami) > .bouncer-token
    
  3. Create a proxy and enable it

    bouncer admin proxy create --proxy-to https://www.cadoles.com --proxy-name cadoles
    bouncer admin proxy update --proxy-name cadoles --proxy-enabled=true
    
  4. With you host web browser, open http://localhost:9000, you should see the Cadoles website.

Benchmarking

You can use siege to benchmark your instance with the Cadoles proxy.

BASE_URL=http://localhost:9000 make siege