Helm/Keycloak: Difference between revisions
Jump to navigation
Jump to search
Line 80: | Line 80: | ||
| colspan="2" | | | colspan="2" | | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
kubectl | ADMIN_PASS=$(kubectl -n keycloak get secret keycloak -o json|jq -r '.data."admin-password"'|base64 -d) | ||
kubectl | ADMIN_PASS=$(kubectl -n keycloak get secret keycloak -o jsonpath="{.data.admin-password}"|base64 -d) | ||
kubectl | |||
kubectl | kubectl -n keycloak exec -it svc/keycloak -c keycloak -- ls -lah /var|grep keycloak | ||
kubectl -n keycloak exec -it svc/keycloak -c keycloak -- ls -lah /var | |||
kubectl -n keycloak exec -it svc/keycloak -c keycloak -- bash | |||
kubectl -n keycloak exec -it keycloak-postgresql-0 -- bash | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 104: | Line 107: | ||
| valign="top" | | | valign="top" | | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
kubectl delete all --all -n keycloak | kubectl -n keycloak delete all --all | ||
kubectl -n keycloak delete ing --all | |||
kubectl -n keycloak delete sts --all | |||
</syntaxhighlight> | </syntaxhighlight> | ||
| valign="top" | | | valign="top" | | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
kubectl delete svc --all -n keycloak | kubectl -n keycloak delete svc --all | ||
kubectl -n keycloak delete pvc --all | |||
kubectl -n keycloak delete pv --all | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 122: | Line 125: | ||
| valign="top" | | | valign="top" | | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
kubectl rollout history sts keycloak -n keycloak | kubectl -n keycloak rollout history sts keycloak | ||
kubectl -n keycloak rollout restart sts keycloak | |||
kubectl -n keycloak rollout status sts keycloak | |||
</syntaxhighlight> | </syntaxhighlight> | ||
| valign="top" | | | valign="top" | | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
kubectl | kubectl -n keycloak exec -it keycloak-postgresql-0 -- psql -Ukeycloak | ||
kubectl | kubectl -n keycloak logs -f keycloak-postgresql-0 | ||
kubectl | kubectl -n keycloak logs -f keycloak-0 | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 20:56, 31 July 2024
helm pull oci://registry-1.docker.io/bitnamicharts/keycloak --version 22.0.0 --untar helm pull oci://registry-1.docker.io/bitnamicharts/keycloak --version 19.3.3 --untar helm pull oci://registry-1.docker.io/bitnamicharts/keycloak --untar
helm pull oci://registry-1.docker.io/bitnamicharts/keycloak --version 22.0.0 helm pull oci://registry-1.docker.io/bitnamicharts/keycloak --version 19.3.3 helm pull oci://registry-1.docker.io/bitnamicharts/keycloak
Config
export KUBECONFIG="${HOME}/.kube/dev-kubeconfig.yaml"
export KUBECONFIG="${HOME}/.kube/gcp-kubeconfig.yaml"
export KUBECONFIG="${HOME}/.kube/config"
Install
kubectl create namespace keycloak
helm show values oci://registry-1.docker.io/bitnamicharts/keycloak --version 19.3.3|less
cat <<YML | helm install -n keycloak keycloak oci://registry-1.docker.io/bitnamicharts/keycloak --version 19.3.3 -f -
tls:
enabled: false
auth:
adminUser: admin
adminPassword: "sadaqah!"
ingress:
enabled: true
hostname: keycloak.k8s.local
ingressClassName: nginx
postgresql:
enabled: true
auth:
username: keycloak
password: "sadaqah!"
database: keycloak
postgresPassword: "sadaqah!"
architecture: standalone
YML
| |
| |
xdg-open http://keycloak.k8s.local &>/dev/null &
gnome-open http://keycloak.k8s.local &>/dev/null &
|
x-www-browser http://keycloak.k8s.local &>/dev/null &
sensible-browser http://keycloak.k8s.local &>/dev/null &
|
Uninstall
helm uninstall -n keycloak keycloak
kubectl delete namespace keycloak
Playground
helm install -n keycloak keycloak oci://registry-1.docker.io/bitnamicharts/keycloak --version 19.3.3
helm upgrade -n keycloak -i keycloak oci://registry-1.docker.io/bitnamicharts/keycloak --version 22.0.0
helm show values oci://registry-1.docker.io/bitnamicharts/keycloak --version 19.3.3|less
| |
| |
ADMIN_PASS=$(kubectl -n keycloak get secret keycloak -o json|jq -r '.data."admin-password"'|base64 -d)
ADMIN_PASS=$(kubectl -n keycloak get secret keycloak -o jsonpath="{.data.admin-password}"|base64 -d)
kubectl -n keycloak exec -it svc/keycloak -c keycloak -- ls -lah /var|grep keycloak
kubectl -n keycloak exec -it svc/keycloak -c keycloak -- ls -lah /var
kubectl -n keycloak exec -it svc/keycloak -c keycloak -- bash
kubectl -n keycloak exec -it keycloak-postgresql-0 -- bash
| |
| |
kubectl config --kubeconfig=${HOME}/.kube/aws-kubeconfig.yaml view --flatten
kubectl config --kubeconfig=${HOME}/.kube/dev-kubeconfig.yaml view --flatten
kubectl config --kubeconfig=${HOME}/.kube/gcp-kubeconfig.yaml view --flatten
kubectl config --kubeconfig=${HOME}/.kube/config view --flatten
| |
| |
kubectl -n keycloak delete all --all
kubectl -n keycloak delete ing --all
kubectl -n keycloak delete sts --all
|
kubectl -n keycloak delete svc --all
kubectl -n keycloak delete pvc --all
kubectl -n keycloak delete pv --all
|
| |
kubectl -n keycloak rollout history sts keycloak
kubectl -n keycloak rollout restart sts keycloak
kubectl -n keycloak rollout status sts keycloak
|
kubectl -n keycloak exec -it keycloak-postgresql-0 -- psql -Ukeycloak
kubectl -n keycloak logs -f keycloak-postgresql-0
kubectl -n keycloak logs -f keycloak-0
|
References
| ||
| ||