mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-12 00:27:35 +02:00
docs: Update examples (#796)
This commit is contained in:
parent
c77b2c6876
commit
14432daf26
10 changed files with 38 additions and 99 deletions
|
@ -80,6 +80,8 @@ Customize for your identity provider run `docker-compose up -f nginx.docker-comp
|
||||||
- gRPC requests are routed behind the load balancer
|
- gRPC requests are routed behind the load balancer
|
||||||
- Routes default to hosted version of httpbin.org
|
- Routes default to hosted version of httpbin.org
|
||||||
- Includes installer script
|
- Includes installer script
|
||||||
|
- Pomerium serves on HTTPS and your ingress controller may need an annotation to
|
||||||
|
connect properly
|
||||||
|
|
||||||
### GKE
|
### GKE
|
||||||
|
|
||||||
|
@ -87,12 +89,6 @@ Customize for your identity provider run `docker-compose up -f nginx.docker-comp
|
||||||
|
|
||||||
<<< @/docs/configuration/examples/helm/helm_gke.sh
|
<<< @/docs/configuration/examples/helm/helm_gke.sh
|
||||||
|
|
||||||
### AWS ECS
|
|
||||||
|
|
||||||
- Uses Amazon Elastic Container Service
|
|
||||||
|
|
||||||
<<< @/docs/configuration/examples/helm/helm_aws.sh
|
|
||||||
|
|
||||||
### Kubernetes
|
### Kubernetes
|
||||||
|
|
||||||
- Uses Google Kubernetes Engine's built-in ingress to do [HTTPS load balancing]
|
- Uses Google Kubernetes Engine's built-in ingress to do [HTTPS load balancing]
|
||||||
|
@ -121,6 +117,11 @@ Customize for your identity provider run `docker-compose up -f nginx.docker-comp
|
||||||
|
|
||||||
<<< @/docs/configuration/examples/kubernetes/pomerium-proxy.yml
|
<<< @/docs/configuration/examples/kubernetes/pomerium-proxy.yml
|
||||||
|
|
||||||
|
#### pomerium-cache.yml
|
||||||
|
|
||||||
|
<<< @/docs/configuration/examples/kubernetes/pomerium-cache.yml
|
||||||
|
|
||||||
|
|
||||||
#### ingress.yml
|
#### ingress.yml
|
||||||
|
|
||||||
<<< @/docs/configuration/examples/kubernetes/ingress.yml
|
<<< @/docs/configuration/examples/kubernetes/ingress.yml
|
||||||
|
|
|
@ -1,64 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
# PRE-REQ:
|
|
||||||
# 1) Install Helm : You should verify the content of this script before running.
|
|
||||||
# curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
|
|
||||||
# 2) Install https://eksctl.io/
|
|
||||||
# For more information see:
|
|
||||||
# - https://eksworkshop.com/helm_root/helm_intro/install/
|
|
||||||
|
|
||||||
echo "=> [AWS] creating cluster"
|
|
||||||
eksctl create cluster --name=pomerium --nodes=1 --region=us-west-2
|
|
||||||
|
|
||||||
echo "=> [AWS] get cluster credentials so we can use kubctl locally"
|
|
||||||
eksctl utils write-kubeconfig --name=pomerium
|
|
||||||
|
|
||||||
echo "=> [AWS] configure Helm access with RBAC"
|
|
||||||
cat <<EOF >.helm-rbac.yaml
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: tiller
|
|
||||||
namespace: kube-system
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
|
||||||
kind: ClusterRoleBinding
|
|
||||||
metadata:
|
|
||||||
name: tiller
|
|
||||||
roleRef:
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
kind: ClusterRole
|
|
||||||
name: cluster-admin
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: tiller
|
|
||||||
namespace: kube-system
|
|
||||||
EOF
|
|
||||||
|
|
||||||
kubectl apply -f .helm-rbac.yaml
|
|
||||||
# cleanup
|
|
||||||
rm .helm-rbac.yaml
|
|
||||||
|
|
||||||
echo "=> initialize Helm to install Tiller in your cluster"
|
|
||||||
helm init --service-account=tiller
|
|
||||||
helm repo update
|
|
||||||
|
|
||||||
echo "=> install pomerium with helm substituting configuration values as required; be sure to change these"
|
|
||||||
helm install $HOME/charts/stable/pomerium/ \
|
|
||||||
--name pomerium \
|
|
||||||
--set config.sharedSecret=$(head -c32 /dev/urandom | base64) \
|
|
||||||
--set config.cookieSecret=$(head -c32 /dev/urandom | base64) \
|
|
||||||
--set config.cert=$(base64 -i cert.pem) \
|
|
||||||
--set config.key=$(base64 -i privkey.pem) \
|
|
||||||
--set config.policy="$(cat policy.example.yaml | base64)" \
|
|
||||||
--set authenticate.idp.provider="google" \
|
|
||||||
--set authenticate.proxyRootDomains="pomerium.io" \
|
|
||||||
--set authenticate.redirectUrl="https://auth.corp.pomerium.io/oauth2/callback" \
|
|
||||||
--set authenticate.idp.clientID="REPLACE_ME" \
|
|
||||||
--set authenticate.idp.clientSecret="REPLACE_ME" \
|
|
||||||
--set proxy.authenticateServiceUrl="https://auth.corp.pomerium.io" \
|
|
||||||
--set proxy.authorizeServiceUrl="https://access.corp.pomerium.io"
|
|
||||||
|
|
||||||
# When done, clean up by deleting the cluster!
|
|
||||||
#
|
|
||||||
# helm del $(helm ls --all --short) --purge #!!! DELETES ALL YOUR HELM INSTANCES!
|
|
|
@ -15,15 +15,15 @@ gcloud container clusters get-credentials pomerium --region us-west2
|
||||||
echo "=> add pomerium's helm repo"
|
echo "=> add pomerium's helm repo"
|
||||||
helm repo add pomerium https://helm.pomerium.io
|
helm repo add pomerium https://helm.pomerium.io
|
||||||
|
|
||||||
|
echo "=> update helm"
|
||||||
|
helm repo update
|
||||||
|
|
||||||
echo "=> add bitnami's helm repo"
|
echo "=> add bitnami's helm repo"
|
||||||
helm repo add bitnami https://charts.bitnami.com/bitnami
|
helm repo add bitnami https://charts.bitnami.com/bitnami
|
||||||
|
|
||||||
echo "=> install nginx as a sample hello world app"
|
echo "=> install nginx as a sample hello world app"
|
||||||
helm upgrade --install nginx bitnami/nginx --set service.type=ClusterIP
|
helm upgrade --install nginx bitnami/nginx --set service.type=ClusterIP
|
||||||
|
|
||||||
echo "=> update helm"
|
|
||||||
helm repo update
|
|
||||||
|
|
||||||
echo "=> install pomerium with helm"
|
echo "=> install pomerium with helm"
|
||||||
helm install \
|
helm install \
|
||||||
pomerium \
|
pomerium \
|
||||||
|
|
|
@ -20,11 +20,11 @@ spec:
|
||||||
- paths:
|
- paths:
|
||||||
backend:
|
backend:
|
||||||
serviceName: pomerium-proxy-service
|
serviceName: pomerium-proxy-service
|
||||||
servicePort: https
|
servicePort: http
|
||||||
- host: "authenticate.corp.beyondperimeter.com"
|
- host: "authenticate.corp.beyondperimeter.com"
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- paths:
|
- paths:
|
||||||
backend:
|
backend:
|
||||||
serviceName: pomerium-authenticate-service
|
serviceName: pomerium-authenticate-service
|
||||||
servicePort: https
|
servicePort: http
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
# Main configuration flags : https://www.pomerium.io/docs/reference/reference/
|
# Main configuration flags : https://www.pomerium.io/docs/reference/reference/
|
||||||
insecure_server: true
|
insecure_server: true
|
||||||
grpc_insecure: true
|
grpc_insecure: true
|
||||||
|
address: ":80"
|
||||||
|
grpc_address: ":80"
|
||||||
|
|
||||||
authenticate_service_url: https://authenticate.corp.beyondperimeter.com
|
authenticate_service_url: https://authenticate.corp.beyondperimeter.com
|
||||||
authorize_service_url: https://pomerium-authorize-service.default.svc.cluster.local
|
authorize_service_url: http://pomerium-authorize-service.default.svc.cluster.local
|
||||||
cache_service_url: https://pomerium-cache-service.default.svc.cluster.local
|
cache_service_url: http://pomerium-cache-service.default.svc.cluster.local
|
||||||
|
|
||||||
override_certificate_name: "*.corp.beyondperimeter.com"
|
override_certificate_name: "*.corp.beyondperimeter.com"
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,8 @@ metadata:
|
||||||
name: pomerium-authenticate-service
|
name: pomerium-authenticate-service
|
||||||
spec:
|
spec:
|
||||||
ports:
|
ports:
|
||||||
- port: 443
|
- port: 80
|
||||||
name: https
|
name: http
|
||||||
selector:
|
selector:
|
||||||
app: pomerium-authenticate
|
app: pomerium-authenticate
|
||||||
type: NodePort
|
type: NodePort
|
||||||
|
@ -32,8 +32,8 @@ spec:
|
||||||
args:
|
args:
|
||||||
- --config=/etc/pomerium/config.yaml
|
- --config=/etc/pomerium/config.yaml
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 443
|
- containerPort: 80
|
||||||
name: https
|
name: http
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
env:
|
env:
|
||||||
- name: SERVICES
|
- name: SERVICES
|
||||||
|
@ -51,12 +51,12 @@ spec:
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /ping
|
path: /ping
|
||||||
port: 443
|
port: 80
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /ping
|
path: /ping
|
||||||
port: 443
|
port: 80
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
initialDelaySeconds: 5
|
initialDelaySeconds: 5
|
||||||
timeoutSeconds: 1
|
timeoutSeconds: 1
|
||||||
|
|
|
@ -4,7 +4,7 @@ metadata:
|
||||||
name: pomerium-authorize-service
|
name: pomerium-authorize-service
|
||||||
spec:
|
spec:
|
||||||
ports:
|
ports:
|
||||||
- port: 443
|
- port: 80
|
||||||
name: grpc
|
name: grpc
|
||||||
selector:
|
selector:
|
||||||
app: pomerium-authorize
|
app: pomerium-authorize
|
||||||
|
@ -32,7 +32,7 @@ spec:
|
||||||
args:
|
args:
|
||||||
- --config=/etc/pomerium/config.yaml
|
- --config=/etc/pomerium/config.yaml
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 443
|
- containerPort: 80
|
||||||
name: grpc
|
name: grpc
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
env:
|
env:
|
||||||
|
@ -45,12 +45,12 @@ spec:
|
||||||
key: shared-secret
|
key: shared-secret
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
tcpSocket:
|
tcpSocket:
|
||||||
port: 443
|
port: 80
|
||||||
initialDelaySeconds: 5
|
initialDelaySeconds: 5
|
||||||
periodSeconds: 10
|
periodSeconds: 10
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
tcpSocket:
|
tcpSocket:
|
||||||
port: 443
|
port: 80
|
||||||
initialDelaySeconds: 15
|
initialDelaySeconds: 15
|
||||||
periodSeconds: 20
|
periodSeconds: 20
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
clusterIP: None # cache is a headless service!
|
clusterIP: None # cache is a headless service!
|
||||||
ports:
|
ports:
|
||||||
- port: 443
|
- port: 80
|
||||||
name: grpc
|
name: grpc
|
||||||
selector:
|
selector:
|
||||||
app: pomerium-cache
|
app: pomerium-cache
|
||||||
|
@ -33,7 +33,7 @@ spec:
|
||||||
args:
|
args:
|
||||||
- --config=/etc/pomerium/config.yaml
|
- --config=/etc/pomerium/config.yaml
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 443
|
- containerPort: 80
|
||||||
name: grpc
|
name: grpc
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
env:
|
env:
|
||||||
|
@ -46,12 +46,12 @@ spec:
|
||||||
key: shared-secret
|
key: shared-secret
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
tcpSocket:
|
tcpSocket:
|
||||||
port: 443
|
port: 80
|
||||||
initialDelaySeconds: 5
|
initialDelaySeconds: 5
|
||||||
periodSeconds: 10
|
periodSeconds: 10
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
tcpSocket:
|
tcpSocket:
|
||||||
port: 443
|
port: 80
|
||||||
initialDelaySeconds: 15
|
initialDelaySeconds: 15
|
||||||
periodSeconds: 20
|
periodSeconds: 20
|
||||||
|
|
||||||
|
|
|
@ -4,10 +4,10 @@ metadata:
|
||||||
name: pomerium-proxy-service
|
name: pomerium-proxy-service
|
||||||
spec:
|
spec:
|
||||||
ports:
|
ports:
|
||||||
- port: 443
|
- port: 80
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
name: https
|
name: http
|
||||||
targetPort: https
|
targetPort: http
|
||||||
selector:
|
selector:
|
||||||
app: pomerium-proxy
|
app: pomerium-proxy
|
||||||
type: NodePort
|
type: NodePort
|
||||||
|
@ -34,8 +34,8 @@ spec:
|
||||||
args:
|
args:
|
||||||
- --config=/etc/pomerium/config.yaml
|
- --config=/etc/pomerium/config.yaml
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 443
|
- containerPort: 80
|
||||||
name: https
|
name: http
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
env:
|
env:
|
||||||
- name: SERVICES
|
- name: SERVICES
|
||||||
|
@ -53,12 +53,12 @@ spec:
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /ping
|
path: /ping
|
||||||
port: 443
|
port: 80
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /ping
|
path: /ping
|
||||||
port: 443
|
port: 80
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
initialDelaySeconds: 10
|
initialDelaySeconds: 10
|
||||||
timeoutSeconds: 1
|
timeoutSeconds: 1
|
||||||
|
|
|
@ -25,4 +25,4 @@ config:
|
||||||
|
|
||||||
ingress:
|
ingress:
|
||||||
annotations:
|
annotations:
|
||||||
kubernetes.io/ingress.allow-http: false
|
kubernetes.io/ingress.allow-http: "false"
|
Loading…
Add table
Add a link
Reference in a new issue