Adding credentials to helm chart

On this page the section on adding a snapshot says:

  1. Add any required secrets or credentials into an Elasticsearch keystore following the how to use the keystore guide.

But I am confused as to what to name the secret? For example when creating the gcs.client.default.credentials_file I get errors about DNS-1123:

kubectl create secret generic gcs.client.default.credentials_file --from-file=.gcs-key.json
The Secret "gcs.client.default.credentials_file" is invalid: metadata.name: Invalid value: "gcs.client.default.credentials_file": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')

Can someone point me in the right direction here?

Also, copying and pasting the slack_hook from the example does not work:

kubectl create secret generic slack_hook --from-literal=xpack.notification.slack.account.monitoring.secure_url='https://hooks.slack.com/services/asdasdasd/asdasdas/asdasd'
The Secret "slack_hook" is invalid: metadata.name: Invalid value: "slack_hook": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')

submitting a github issue as this is broken

1 Like

_bump

bumpity bump

bumpity bump bump

Answered in https://github.com/elastic/helm-charts/issues/747#issuecomment-693247447

K8S doesn't accept _ in secret names.
https://github.com/elastic/helm-charts/issues/811 will fix the examples we provide.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.