简体   繁体   中英

How to point Kubernetes secrets to Configmap

We are trying integrate our workflow service with SSO(using OKTA for OIDC). now I got Okta ClientID and Secret key. Need to update the workflow configmap with K8 secrets.

I created K8 secrets with the below commands but my configmap is not picking up them. Can you please point me what I am missing?

kubectl create secret -n argo generic client-id-secret --from-literal=client-id-key=xyuawyeioweh
kubectl create secret -n argo generic client-secret-secret --from-literal=client-secret-key=xxxxxxxxxxx

This is my configmap:

sso: |
    issuer: https://xxxxxx
    clientId:
      name: client-id-secret
      key: xxxxxxxxx
    clientSecret:
      name: client-secret-secret
      key: xxxxxxxxxxxx
    redirectUrl: https://workflows.apps/oauth2/callback

Thank you CS

Looks like you are trying to call secret inside the config map. You can not do so. In Kubernetes world, both are separate objects and you have to use them in pod/deployment etc definition.

In your above scenario, mount/use the secrets in the deployment/pod and have some script to read those inside pods and populate your sso configuration with the same.

Share your deployment YAML for more accurate answer.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM