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

CTOR-1043 : Doc(cloud-kubernetes-api) : Update prerequisites for Kubectl version #3820

Open
wants to merge 5 commits into
base: staging
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,32 @@ Se référer à la documentation officielle pour la
ou pour des informations sur le
[concept de secret](https://kubernetes.io/docs/concepts/configuration/secret/).

##### Kubectl version 1.24 et supérieures

Depuis la version 1.24 de kubectl, vous devez créer un compte de service avec une annotation spéciale:

```
kubernetes.io/service-account.name
```

Créez manuellement un jeton API à longue durée de vie pour un compte de service.

Si vous souhaitez obtenir un jeton API pour un compte de service, vous devez créer un nouveau Secret avec une annotation spéciale, kubernetes.io/service-account.name.
lucie-dubrunfaut marked this conversation as resolved.
Show resolved Hide resolved

```
kubectl apply -f - <<EOF
apiVersion: v1
kind: Secret
metadata:
name: build-robot-secret
annotations:
kubernetes.io/service-account.name: build-robot
type: kubernetes.io/service-account-token
EOF
```

Plus d'informations dans la section de la documentation officielle de kubernetes [Manually create a long-lived API token for a ServiceAccount](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#manually-create-a-long-lived-api-token-for-a-serviceaccount).

#### Utilisation de l'API Rest

Si vous avez choisi de communiquer avec l'API Rest de votre plateforme
Expand Down
26 changes: 26 additions & 0 deletions pp/integrations/plugin-packs/procedures/cloud-kubernetes-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,32 @@ Refer to the official documentation for
or information about
[secret concept](https://kubernetes.io/docs/concepts/configuration/secret/).

##### Kubectl version 1.24 and above

From kubectl version 1.24 you need to create a service account with a special annotation:

```
kubernetes.io/service-account.name
```

Manually create a long-lived API token for a ServiceAccount

If you want to obtain an API token for a ServiceAccount, you create a new Secret with a special annotation, kubernetes.io/service-account.name.
lucie-dubrunfaut marked this conversation as resolved.
Show resolved Hide resolved

```
kubectl apply -f - <<EOF
apiVersion: v1
kind: Secret
metadata:
name: build-robot-secret
annotations:
kubernetes.io/service-account.name: build-robot
type: kubernetes.io/service-account-token
EOF
```

More information in kubernetes official documentation section [Manually create a long-lived API token for a ServiceAccount](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#manually-create-a-long-lived-api-token-for-a-serviceaccount).
lucie-dubrunfaut marked this conversation as resolved.
Show resolved Hide resolved

#### Using RestAPI

If you chose to communicate with your Kubernetes platform's RestAPI, the
Expand Down