USING HELM

O Kubernetes deve ser acima de 1.16

Install Operator Lifecycle Manager

https://github.com/operator-framework/operator-lifecycle-manager/blob/master/doc/install/install.md

Run User Interface

https://github.com/operator-framework/operator-lifecycle-manager

Keycloak can be accessed through the following DNS name from within your cluster:
 
    keycloak-release.keycloak.svc.cluster.local (port 80)
 
To access Keycloak from outside the cluster execute the following commands:
 
1. Get the Keycloak URL by running these commands:
 
  NOTE: It may take a few minutes for the LoadBalancer IP to be available.
        You can watch its status by running 'kubectl get --namespace keycloak svc -w keycloak-release'
 
    export SERVICE_PORT=$(kubectl get --namespace keycloak -o jsonpath="{.spec.ports[0].port}" services keycloak-release)
    export SERVICE_IP=$(kubectl get svc --namespace keycloak keycloak-release -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
    echo "http://${SERVICE_IP}:${SERVICE_PORT}/auth"
 
2. Access Keycloak using the obtained URL.
3. Access the Administration Console using the following credentials:
 
  echo Username: user
  echo Password: $(kubectl get secret --namespace keycloak keycloak-release-env-vars -o jsonpath="{.data.KEYCLOAK_ADMIN_PASSWORD}" | base64 --decode)

Adcionar “Fine Grain Admin Permissions”

Para fazer o deploy no kubernetes com essa feature, é necessário fazer o pull do helm chart localmente:

  • Download Chart
helm pull bitnami/keycloak
  • Abra o arquivo values.yaml
  • Edite/Adicione no YAML o código a seguir (para configurar a variável de ambiente “JAVA_OPTS”:
extraEnv:
  - name: JAVA_OPTS
    value: "-Dkeycloak.profile=preview -Dkeycloak.profile.feature.admin_fine_grained_authz=enabled"
 
 
extraEnvVars:
  - name: JAVA_OPTS
    value: "-Dkeycloak.profile=preview -Dkeycloak.profile.feature.admin_fine_grained_authz=enabled"
  • Salve o arquivo e aplique o YAML com o comando:
helm install keycloack -n keycloack --values=values.yaml bitnami/keycloak

Ktor-starter

id: ktor-starter

Installation:

{ “realm”: “Demo”, “auth-server-url”: “http://34.86.33.201/auth/”, “ssl-required”: “external”, “resource”: “ktor-starter”, “credentials”: { “secret”: “f0286d39-d28a-45e2-bebc-d5737895ad65” }, “confidential-port”: 0 }

https://developers.redhat.com/blog/2020/11/24/authentication-and-authorization-using-the-keycloak-rest-api/


🌱 Back to Garden

1 item under this folder.