Skip to content

Instantly share code, notes, and snippets.

@jkatz
Created January 22, 2021 22:22
Show Gist options
  • Save jkatz/5a36cfce7219384bd16a79aee7cec6bb to your computer and use it in GitHub Desktop.
Save jkatz/5a36cfce7219384bd16a79aee7cec6bb to your computer and use it in GitHub Desktop.
pgo create cluster postgres -n pgo --database=keycloak --username=admin --password=admin
# wait for startup
cat <<-EOF > kc-deploy.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: keycloak
labels:
app: keycloak
spec:
selector:
matchLabels:
app: keycloak
template:
metadata:
labels:
app: keycloak
spec:
containers:
- image: quay.io/keycloak/keycloak:12.0.2
name: keycloak
env:
- name: DB_VENDOR
value: "postgres"
- name: DB_ADDR
value: "postgres"
- name: DB_PORT
value: "5432"
- name: DB_DATABASE
value: "keycloak"
- name: DB_USER
value: "admin"
- name: DB_PASSWORD
value: "admin"
- name: KEYCLOAK_USER
value: "admin"
- name: KEYCLOAK_PASSWORD
value: "admin"
- name: PROXY_ADDRESS_FORWARDING
value: "true"
ports:
- name: http
containerPort: 8080
- name: https
containerPort: 8443
readinessProbe:
httpGet:
path: /auth/realms/master
port: 8080
restartPolicy: Always
EOF
kubectl apply -n pgo -f kc-deploy.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment