You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/templates/kubernetes-multi-service/README.md
+18-17
Original file line number
Diff line number
Diff line change
@@ -6,11 +6,12 @@ tags: [cloud, kubernetes]
6
6
7
7
# Authentication
8
8
9
-
This template has several ways to authenticate to a Kubernetes cluster.
9
+
This template features two ways to authenticate to a Kubernetes cluster.
10
10
11
11
## kubeconfig (Coder host)
12
12
13
-
If the Coder host has a local `~/.kube/config`, this can be used to authenticate with Coder. Make sure this is on the same user running the `coder` service.
13
+
If the Coder host has a local `~/.kube/config`, you can use this to authenticate
14
+
with Coder. Make sure this is done with same user that's running the `coder` service.
14
15
15
16
## ServiceAccount
16
17
@@ -52,26 +53,26 @@ Create a ServiceAccount and role on your cluster to authenticate your template w
52
53
EOF
53
54
```
54
55
55
-
1. Use the following commands to fetch the values:
56
+
1. Use the following commands to fetch the values:
56
57
57
-
**Cluster IP:**
58
+
**Cluster IP:**
58
59
59
-
```sh
60
-
kubectl cluster-info | grep "control plane"
61
-
```
60
+
```sh
61
+
kubectl cluster-info | grep "control plane"
62
+
```
62
63
63
-
**CA certificate**
64
+
**CA certificate**
64
65
65
-
```sh
66
-
kubectl get secrets -n $CODER_NAMESPACE -o jsonpath="{.items[?(@.metadata.annotations['kubernetes\.io/service-account\.name']=='coder')].data['ca\.crt']}{'\n'}"
67
-
```
66
+
```sh
67
+
kubectl get secrets -n $CODER_NAMESPACE -o jsonpath="{.items[?(@.metadata.annotations['kubernetes\.io/service-account\.name']=='coder')].data['ca\.crt']}{'\n'}"
68
+
```
68
69
69
-
**Token**
70
+
**Token**
70
71
71
-
```sh
72
-
kubectl get secrets -n $CODER_NAMESPACE -o jsonpath="{.items[?(@.metadata.annotations['kubernetes\.io/service-account\.name']=='coder')].data['token']}{'\n'}"
73
-
```
72
+
```sh
73
+
kubectl get secrets -n $CODER_NAMESPACE -o jsonpath="{.items[?(@.metadata.annotations['kubernetes\.io/service-account\.name']=='coder')].data['token']}{'\n'}"
74
+
```
74
75
75
-
**Namespace**
76
+
**Namespace**
76
77
77
-
This should be the same as `$CODER_NAMESPACE`, setin step 1.
78
+
This should be the same as `$CODER_NAMESPACE`, setin step 1.
0 commit comments