Deploy bitly/oauth2_proxy using docker and kubernetes
Details on how to obtain the configuration options below are available here
- Run kubectl to create the deployment and apps Namespace. The containers wont run until the configs are created below.
kubectl apply -f k8s.yaml
- Create a config map for the oauth2_proxy config items
cat > "oauth2_proxy_config" << EOF
EMAIL_DOMAIN=equalexperts.com
UPSTREAM=http://kibana.instrumentation:5602/
CLIENT_ID=101010101010-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com
EOF
kubectl create configmap oauth2-proxy-config -n apps --from-env-file=oauth2_proxy_config
- Create secrets for oauth2_proxy. The 'Client Secret' provided in the GoogleAPIs interface should be used for both COOKIE_SECRET and CLIENT_SECRET below.
cat > oauth2-proxy-secret << EOF
COOKIE_SECRET=XXXXXXXXXXXXXXXXXXXXXXXXXXX
CLIENT_SECRET=XXXXXXXXXXXXXXXXXXXXXXXXXXX
EOF
kubectl create secret generic oauth2-proxy-secret -n apps \
--from-env-file=oauth2-proxy-secret
export VHOST="oauth2_proxy.example.com"
kubectl apply -f <(envsubst < ingress.yaml.template)