Skip to content

Commit 37155c8

Browse files
committed
Revert "docs: fix typo in additional-clusters.md (#10868)"
This reverts commit 481fc9a.
1 parent 481fc9a commit 37155c8

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

docs/platforms/kubernetes/additional-clusters.md

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -109,22 +109,24 @@ kubectl apply -n coder-workspaces -f - <<EOF
109109
apiVersion: v1
110110
kind: ServiceAccount
111111
metadata:
112-
name: coder-v2
112+
# Must be different than the Coder control plane service account, so prevent duplicates.
113+
name: coder-2
113114
---
114115
apiVersion: v1
115116
kind: Secret
116117
metadata:
117-
name: coder-v2
118+
name: coder-service-account-token
118119
annotations:
119-
kubernetes.io/service-account.name: coder-v2
120+
kubernetes.io/service-account.name: coder
120121
type: kubernetes.io/service-account-token
121122
---
122123
apiVersion: rbac.authorization.k8s.io/v1
123124
kind: Role
124125
metadata:
125-
name: coder-v2
126+
# Must be different than the Coder control plane service account, so prevent duplicates.
127+
name: coder-2
126128
rules:
127-
- apiGroups: ["", "apps", "networking.k8s.io"]
129+
- apiGroups: ["", "apps", "networking.k8s.io"] # "" indicates the core API group
128130
resources: ["persistentvolumeclaims", "pods", "deployments", "services", "secrets", "pods/exec","pods/log", "events", "networkpolicies", "serviceaccounts"]
129131
verbs: ["create", "get", "list", "watch", "update", "patch", "delete", "deletecollection"]
130132
- apiGroups: ["metrics.k8s.io", "storage.k8s.io"]
@@ -134,24 +136,25 @@ rules:
134136
apiVersion: rbac.authorization.k8s.io/v1
135137
kind: RoleBinding
136138
metadata:
137-
name: coder-v2
139+
# Must be different than the Coder control plane service account, so prevent duplicates.
140+
name: coder-2
138141
subjects:
139142
- kind: ServiceAccount
140-
name: coder-v2
143+
name: coder
141144
roleRef:
142145
kind: Role
143-
name: coder-v2
146+
name: coder
144147
apiGroup: rbac.authorization.k8s.io
145148
EOF
146149
```
147150

148151
The output should be similar to:
149152

150153
```text
151-
serviceaccount/coder-v2 created
152-
secret/coder-v2 created
153-
role.rbac.authorization.k8s.io/coder-v2 created
154-
rolebinding.rbac.authorization.k8s.io/coder-v2 created
154+
serviceaccount/coder created
155+
secret/coder-service-account-token created
156+
role.rbac.authorization.k8s.io/coder created
157+
rolebinding.rbac.authorization.k8s.io/coder created
155158
```
156159

157160
### 2. Modify the Kubernetes template
@@ -203,9 +206,9 @@ export CLUSTER_ADDRESS=https://example.domain:6443
203206
To fetch the CA certificate and token:
204207

205208
```shell
206-
export CLUSTER_CA_CERTIFICATE=$(kubectl get secrets coder-v2 -n coder-workspaces -o jsonpath="{.data.ca\.crt}")
209+
export CLUSTER_CA_CERTIFICATE=$(kubectl get secrets coder-service-account-token -n coder-workspaces -o jsonpath="{.data.ca\.crt}")
207210
208-
export CLUSTER_SERVICEACCOUNT_TOKEN=$(kubectl get secrets coder-v2 -n coder-workspaces -o jsonpath="{.data.token}")
211+
export CLUSTER_SERVICEACCOUNT_TOKEN=$(kubectl get secrets coder-service-account-token -n coder-workspaces -o jsonpath="{.data.token}")
209212
```
210213

211214
Create the template with these values:

0 commit comments

Comments
 (0)