Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

docs: fix docs on deploying workspaces in additional namespaces#13724

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
matifali merged 4 commits intomainfromfix-sa-docs
Jul 10, 2024
Merged
Changes fromall commits
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
32 changes: 8 additions & 24 deletionsdocs/platforms/kubernetes/additional-clusters.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -99,30 +99,16 @@ Alternatively, these could also be fetched from Kubernetes secrets or even
This guide assumes you have a `coder-workspaces` namespace on your remote
cluster. Change the namespace accordingly.

### Create aServiceAccount
### Create aRole and RoleBinding

Run this command against your remote cluster to create a ServiceAccount, Role,
RoleBinding, and token:
Run this command against your remote cluster to create a Role and RoleBinding:

```shell
kubectl apply -n coder-workspaces -f - <<EOF
apiVersion: v1
kind: ServiceAccount
metadata:
name: coder-v2
---
apiVersion: v1
kind: Secret
metadata:
name: coder-v2
annotations:
kubernetes.io/service-account.name: coder-v2
type: kubernetes.io/service-account-token
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: coder-v2
name: coder-workspaces
rules:
- apiGroups: ["", "apps", "networking.k8s.io"]
resources: ["persistentvolumeclaims", "pods", "deployments", "services", "secrets", "pods/exec","pods/log", "events", "networkpolicies", "serviceaccounts"]
Expand All@@ -134,24 +120,22 @@ rules:
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: coder-v2
name: coder-workspaces
subjects:
- kind: ServiceAccount
name: coder-v2
name: coder
roleRef:
kind: Role
name: coder-v2
name: coder-workspaces
apiGroup: rbac.authorization.k8s.io
EOF
```

The output should be similar to:

```text
serviceaccount/coder-v2 created
secret/coder-v2 created
role.rbac.authorization.k8s.io/coder-v2 created
rolebinding.rbac.authorization.k8s.io/coder-v2 created
role.rbac.authorization.k8s.io/coder-workspaces created
rolebinding.rbac.authorization.k8s.io/coder-workspaces created
```

### 2. Modify the Kubernetes template
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp