For the complete documentation index, see llms.txt. This page is also available as Markdown.

Store delegate tokens as Kubernetes secrets

Learn how to securely store delegate tokens as Kubernetes secrets instead of ConfigMaps for enhanced security.

You can store your delegate tokens as a Kubernetes secret instead of a ConfigMap.

To store the delegate token as a Kubernetes secret, do the following:

  1. Create a Kubernetes secret. For details, go to the Kubernetes documentation: Secrets.

  2. Create a delegate-token.yaml file.

    apiVersion: v1
    kind: Secret
      metadata:
      name: token-secret
      namespace: harness-delegate-ng
      type: Opaque
    stringData:
    DELEGATE_TOKEN: <Delegate-token-value>
  3. Run the following to apply the YAML file.

    kubectl -f delegate-token.yaml
  4. Modify the delegate.yaml file to provide the reference to the secret you created.

    - name: DELEGATE_TOKEN
      valueFrom:
        secretKeyRef:
          name: token-secret
          key: DELEGATE_TOKEN

Last updated

Was this helpful?