Skip to content

Commit 756c8b5

Browse files
committed
remove redundant account creation
1 parent 54908ec commit 756c8b5

File tree

1 file changed

+1
-31
lines changed

1 file changed

+1
-31
lines changed

docs/tutorials/setup_k8s.md

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,9 @@ sudo chmod +x /usr/local/bin/kubectl
8080

8181
Note that this is overwritting the kubectl that comes with k3s. That is a special version that reads its config from /etc/rancher/k3s/k3s.yaml and must therefore be run with sudo. The version we are installing here is the standard version that reads its config from $HOME/.kube/config.
8282

83-
```bash
8483
### Configure kubectl
8584

86-
kubectl uses a default configuration file **$HOME/.kube/config** to connect to the cluster. Here we will copy the configuration file from the server to the workstation.
85+
kubectl uses a default configuration file **$HOME/.kube/config** to connect to the cluster. Here we will copy the configuration file from the server to the workstation.
8786

8887
If you have one machine only then copy the k3s kubectl configuration into your home directory:
8988

@@ -146,35 +145,6 @@ kubectl config set-context t03-beamline --namespace=t03-beamline --user=default
146145
kubectl config use-context t03-beamline
147146
```
148147

149-
### Create a service account to run the IOCs
150-
151-
Inside of our new namespace we will create a service account that will be used to run the IOCs. Kubernetes uses a declarative model where you define the desired state of the system and Kubernetes will make it so. Here we will create a service account and a secret that will be used to authenticate the service account. In both cases these are defined directly using command line YAML which kubectl passes to the Kubernetes API.
152-
153-
Create the account:
154-
155-
```bash
156-
kubectl apply -f - <<EOF
157-
apiVersion: v1
158-
kind: ServiceAccount
159-
metadata:
160-
name: bl03t-priv
161-
EOF
162-
```
163-
164-
Generate a login token for the account:
165-
166-
```bash
167-
kubectl apply -f - <<EOF
168-
apiVersion: v1
169-
kind: Secret
170-
metadata:
171-
name: bl03t-priv-secret
172-
annotations:
173-
kubernetes.io/service-account.name: bl03t-priv
174-
type: kubernetes.io/service-account-token
175-
EOF
176-
```
177-
178148
### Completed
179149

180150
That's it. You now have installed the necessary software to start experimenting with IOCs on Kubernetes.

0 commit comments

Comments
 (0)