Skip to content

Commit

Permalink
docs: correct link to k8s docs for manually creating Secrets (#12042)
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Gilgur <[email protected]>
  • Loading branch information
Anton Gilgur authored Oct 20, 2023
1 parent 7b2c4aa commit 5886f0b
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions docs/manually-create-secrets.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# Kubernetes Secrets
# Service Account Secrets

As of Kubernetes v1.24, secrets are no longer automatically created for service accounts.

You must create a secret
manually: [Find out how to create these yourself manually](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#manually-create-a-service-account-api-token)
.
You must [create a secret manually](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#manually-create-a-long-lived-api-token-for-a-serviceaccount).

You must make the secret discoverable. You have two options:
You must also make the secret discoverable.
You have two options:

## Option 1 - Discovery By Name

Name your secret `${serviceAccountName}.service-account-token`.
Name your secret `${serviceAccountName}.service-account-token`:

```yaml
apiVersion: v1
Expand All @@ -22,7 +21,7 @@ metadata:
type: kubernetes.io/service-account-token
```
This option is simpler than option 2, as you can combine creating the secret with making it discoverable by name.
This option is simpler than option 2, as you can create the secret and make it discoverable by name at the same time.
## Option 2 - Discovery By Annotation
Expand Down

0 comments on commit 5886f0b

Please sign in to comment.