Merge branch 'patch-233' into 'master'

Chore: Align cluster service token docs with code

See merge request gitlab-org/gitlab!42252
parents a5549ae3 cc23fef0
...@@ -206,7 +206,7 @@ To add a Kubernetes cluster to your project, group, or instance: ...@@ -206,7 +206,7 @@ To add a Kubernetes cluster to your project, group, or instance:
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
metadata: metadata:
name: gitlab-admin name: gitlab
namespace: kube-system namespace: kube-system
--- ---
apiVersion: rbac.authorization.k8s.io/v1beta1 apiVersion: rbac.authorization.k8s.io/v1beta1
...@@ -219,7 +219,7 @@ To add a Kubernetes cluster to your project, group, or instance: ...@@ -219,7 +219,7 @@ To add a Kubernetes cluster to your project, group, or instance:
name: cluster-admin name: cluster-admin
subjects: subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: gitlab-admin name: gitlab
namespace: kube-system namespace: kube-system
``` ```
...@@ -245,23 +245,23 @@ To add a Kubernetes cluster to your project, group, or instance: ...@@ -245,23 +245,23 @@ To add a Kubernetes cluster to your project, group, or instance:
Output: Output:
```shell ```shell
serviceaccount "gitlab-admin" created serviceaccount "gitlab" created
clusterrolebinding "gitlab-admin" created clusterrolebinding "gitlab-admin" created
``` ```
1. Retrieve the token for the `gitlab-admin` service account: 1. Retrieve the token for the `gitlab` service account:
```shell ```shell
kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep gitlab-admin | awk '{print $1}') kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep gitlab | awk '{print $1}')
``` ```
Copy the `<authentication_token>` value from the output: Copy the `<authentication_token>` value from the output:
```yaml ```yaml
Name: gitlab-admin-token-b5zv4 Name: gitlab-token-b5zv4
Namespace: kube-system Namespace: kube-system
Labels: <none> Labels: <none>
Annotations: kubernetes.io/service-account.name=gitlab-admin Annotations: kubernetes.io/service-account.name=gitlab
kubernetes.io/service-account.uid=bcfe66ac-39be-11e8-97e8-026dce96b6e8 kubernetes.io/service-account.uid=bcfe66ac-39be-11e8-97e8-026dce96b6e8
Type: kubernetes.io/service-account-token Type: kubernetes.io/service-account-token
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment