blob: e2a07bf02bcc49ca12ece66aaeae70c71edb5c29 [file] [log] [blame]
Oleksandr Kozachenkob0093492023-09-06 21:43:47 +02001CHART NAME: {{ .Chart.Name }}
2CHART VERSION: {{ .Chart.Version }}
3APP VERSION: {{ .Chart.AppVersion }}
4
5** Please be patient while the chart is being deployed **
6
7Keycloak can be accessed through the following DNS name from within your cluster:
8
9 {{ include "common.names.fullname" . }}.{{ include "common.names.namespace" . }}.svc.{{ .Values.clusterDomain }} (port {{ coalesce .Values.service.ports.http .Values.service.port }})
10
11To access Keycloak from outside the cluster execute the following commands:
12
13{{- if .Values.ingress.enabled }}
14
151. Get the Keycloak URL and associate its hostname to your cluster external IP:
16
17 export CLUSTER_IP=$(minikube ip) # On Minikube. Use: `kubectl cluster-info` on others K8s clusters
18 echo "Keycloak URL: http{{ if .Values.ingress.tls }}s{{ end }}://{{ (tpl .Values.ingress.hostname .) }}/"
19 echo "$CLUSTER_IP {{ (tpl .Values.ingress.hostname .) }}" | sudo tee -a /etc/hosts
20
Mohammed Naser65cda132024-05-02 14:34:08 -040021{{- if .Values.adminIngress.enabled }}
22The admin area of Keycloak has been configured to point to a different domain ({{ .Values.adminIngress.hostname }}). Please remember to update the `frontendUrl` property of the `master` (or any other) realm for it to work properly (see README for an example) :
23
24 echo "Keycloak admin URL: http{{ if .Values.adminIngress.tls }}s{{ end }}://{{ (tpl .Values.adminIngress.hostname .) }}/"
25 echo "$CLUSTER_IP {{ (tpl .Values.adminIngress.hostname .) }}" | sudo tee -a /etc/hosts
26{{- end }}
27
Oleksandr Kozachenkob0093492023-09-06 21:43:47 +020028{{- else }}
29
301. Get the Keycloak URL by running these commands:
31
32{{- if contains "NodePort" .Values.service.type }}
33
34 export HTTP_NODE_PORT=$(kubectl get --namespace {{ include "common.names.namespace" . }} -o jsonpath="{.spec.ports[?(@.name=='http')].nodePort}" services {{ include "common.names.fullname" . }})
35 {{- if .Values.tls.enabled }}
36 export HTTPS_NODE_PORT=$(kubectl get --namespace {{ include "common.names.namespace" . }} -o jsonpath="{.spec.ports[?(@.name=='https')].nodePort}" services {{ include "common.names.fullname" . }})
37 {{- end }}
38 export NODE_IP=$(kubectl get nodes --namespace {{ include "common.names.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}")
39
40 echo "http://${NODE_IP}:${HTTP_NODE_PORT}/"
41 {{- if .Values.tls.enabled }}
42 echo "https://${NODE_IP}:${HTTPS_NODE_PORT}/"
43 {{- end }}
44
45{{- else if contains "LoadBalancer" .Values.service.type }}
46
47 NOTE: It may take a few minutes for the LoadBalancer IP to be available.
48 You can watch its status by running 'kubectl get --namespace {{ include "common.names.namespace" . }} svc -w {{ include "common.names.fullname" . }}'
49
50 export HTTP_SERVICE_PORT=$(kubectl get --namespace {{ include "common.names.namespace" . }} -o jsonpath="{.spec.ports[?(@.name=='http')].port}" services {{ include "common.names.fullname" . }})
51 {{- if .Values.tls.enabled }}
52 export HTTPS_SERVICE_PORT=$(kubectl get --namespace {{ include "common.names.namespace" . }} -o jsonpath="{.spec.ports[?(@.name=='https')].port}" services {{ include "common.names.fullname" . }})
53 {{- end }}
54 export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.names.namespace" . }} {{ include "common.names.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
55
56 echo "http://${SERVICE_IP}:${HTTP_SERVICE_PORT}/"
57 {{- if .Values.tls.enabled }}
58 echo "https://${SERVICE_IP}:${HTTPS_SERVICE_PORT}/"
59 {{- end }}
60
61{{- else if contains "ClusterIP" .Values.service.type }}
62
63 export HTTP_SERVICE_PORT=$(kubectl get --namespace {{ include "common.names.namespace" . }} -o jsonpath="{.spec.ports[?(@.name=='http')].port}" services {{ include "common.names.fullname" . }})
64 {{- if .Values.tls.enabled }}
65 export HTTPS_SERVICE_PORT=$(kubectl get --namespace {{ include "common.names.namespace" . }} -o jsonpath="{.spec.ports[?(@.name=='https')].port}" services {{ include "common.names.fullname" . }})
66 kubectl port-forward --namespace {{ include "common.names.namespace" . }} svc/{{ include "common.names.fullname" . }} ${HTTP_SERVICE_PORT}:${HTTP_SERVICE_PORT} ${HTTPS_SERVICE_PORT}:${HTTPS_SERVICE_PORT} &
67 {{- else }}
68 kubectl port-forward --namespace {{ include "common.names.namespace" . }} svc/{{ include "common.names.fullname" . }} ${HTTP_SERVICE_PORT}:${HTTP_SERVICE_PORT} &
69 {{- end }}
70
71 echo "http://127.0.0.1:${HTTP_SERVICE_PORT}/"
72 {{- if .Values.tls.enabled }}
73 echo "https://127.0.0.1:${HTTPS_SERVICE_PORT}/"
74 {{- end }}
75
76{{- end }}
77{{- end }}
78
792. Access Keycloak using the obtained URL.
80{{- if and .Values.auth.adminUser .Values.auth.adminPassword }}
813. Access the Administration Console using the following credentials:
82
83 echo Username: {{ .Values.auth.adminUser }}
84 echo Password: $(kubectl get secret --namespace {{ include "common.names.namespace" . }} {{ include "keycloak.secretName" . }} -o jsonpath="{.data.{{ include "keycloak.secretKey" .}}}" | base64 -d)
85{{- end }}
86{{- if .Values.metrics.enabled }}
87
88You can access the Prometheus metrics following the steps below:
89
901. Get the Keycloak Prometheus metrics URL by running:
91
92 {{- $metricsPort := coalesce .Values.metrics.service.ports.http .Values.metrics.service.port | toString }}
93 kubectl port-forward --namespace {{ include "common.names.namespace" . }} svc/{{ printf "%s-metrics" (include "common.names.fullname" .) }} {{ $metricsPort }}:{{ $metricsPort }} &
94 echo "Keycloak Prometheus metrics URL: http://127.0.0.1:{{ $metricsPort }}/metrics"
95
962. Open a browser and access Keycloak Prometheus metrics using the obtained URL.
97
98{{- end }}
99
100{{- include "keycloak.validateValues" . }}
101{{- include "common.warnings.rollingTag" .Values.image }}
102{{- include "common.warnings.rollingTag" .Values.keycloakConfigCli.image }}
Mohammed Naser65cda132024-05-02 14:34:08 -0400103{{- include "common.warnings.resources" (dict "sections" (list "keycloakConfigCli" "") "context" $) }}