Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bitnami/keycloak] "Error: secret "keycloak-externaldb" not found" when trying to install helm chart using external database #30681

Open
federicochiesa opened this issue Nov 29, 2024 · 2 comments
Assignees
Labels
keycloak tech-issues The user has a technical issue about an application triage Triage is needed

Comments

@federicochiesa
Copy link

federicochiesa commented Nov 29, 2024

Name and Version

bitnami/keycloak 24.2.2

What architecture are you using?

amd64

What steps will reproduce the bug?

  1. Install with the provided values file
  2. kubectl describe pod keycloak-0 -n sso
  3. I get the error in the title

Are you using any custom parameters or values?

nameOverride: "keycloak"
namespaceOverride: "sso"
image:
  registry: docker.io
  repository: bitnami/keycloak
  tag: 26.0.6-debian-12-r0

adminRealm: "master"

production: true

proxy: "edge"

replicaCount: 2

resourcesPreset: "medium"

livenessProbe:
  enabled: true
  initialDelaySeconds: 300
  periodSeconds: 1
  timeoutSeconds: 5
  failureThreshold: 1
  successThreshold: 1

readinessProbe:
  enabled: true
  initialDelaySeconds: 30
  periodSeconds: 10
  timeoutSeconds: 1
  failureThreshold: 1
  successThreshold: 1

autoscaling:
  enabled: true
  minReplicas: 1
  maxReplicas: 3
  
  behavior:
    scaleUp:
      stabilizationWindowSeconds: 120
      selectPolicy: Max
      policies: []
    scaleDown:
      stabilizationWindowSeconds: 300
      selectPolicy: Max
      policies:
        - type: Pods
          value: 1
          periodSeconds: 300

postgresql:
  enabled: false

externalDatabase:
  host: "xxxxxxxxxxxxx"
  port: 5432
  user: keycloak_kubernetes
  database: keycloak_kubernetes
  password: "xxxxxxxxxxx"

logging:
  output: default
  level: WARN

What is the expected behavior?

It should connect to the DB using the provided values, which are the same as indicated in the readme.

What do you see instead?

Events:
  Type     Reason     Age                   From               Message
  ----     ------     ----                  ----               -------
  Normal   Scheduled  29m                   default-scheduler  Successfully assigned sso/keycloak-0 to xxxxxxxxxx
  Normal   Pulling    29m                   kubelet            Pulling image "docker.io/bitnami/keycloak:26.0.6-debian-12-r0"
  Normal   Pulled     28m                   kubelet            Successfully pulled image "docker.io/bitnami/keycloak:26.0.6-debian-12-r0" in 17.598s (17.598s including waiting). Image size: 422618500 bytes.
  Normal   Created    28m                   kubelet            Created container prepare-write-dirs
  Normal   Started    28m                   kubelet            Started container prepare-write-dirs
  Warning  Failed     26m (x10 over 28m)    kubelet            Error: secret "keycloak-externaldb" not found
  Normal   Pulled     4m7s (x116 over 28m)  kubelet            Container image "docker.io/bitnami/keycloak:26.0.6-debian-12-r0" already present on machine
@federicochiesa federicochiesa added the tech-issues The user has a technical issue about an application label Nov 29, 2024
@github-actions github-actions bot added the triage Triage is needed label Nov 29, 2024
@javsalgar javsalgar changed the title "Error: secret "keycloak-externaldb" not found" when trying to install helm chart using external database [bitnami/keycloak] "Error: secret "keycloak-externaldb" not found" when trying to install helm chart using external database Dec 2, 2024
@javsalgar
Copy link
Contributor

Hi!

Could you run kubectl get secrets to see if there is a secret created for the external database?

@federicochiesa
Copy link
Author

federicochiesa commented Dec 2, 2024

There was this secret:

Name:         keycloak-externaldb
Namespace:    default
Labels:       app.kubernetes.io/instance=keycloak
              app.kubernetes.io/managed-by=Helm
              app.kubernetes.io/name=keycloak
              app.kubernetes.io/version=26.0.6
              helm.sh/chart=keycloak-24.2.2
Annotations:  meta.helm.sh/release-name: keycloak
              meta.helm.sh/release-namespace: default

Type:  Opaque

Data
====
db-password:  20 bytes

I tried to delete it along with everything else and start from scratch, but I get the same exact error and the secret reappeared.

The secret contained the correct password for the DB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keycloak tech-issues The user has a technical issue about an application triage Triage is needed
Projects
None yet
Development

No branches or pull requests

2 participants