Skip to content

Commit 325beb4

Browse files
committed
update k3s installation
1 parent a8db1ee commit 325beb4

File tree

1 file changed

+19
-29
lines changed

1 file changed

+19
-29
lines changed

docs/user/tutorials/setup_k8s.rst

Lines changed: 19 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,18 @@
44
Setup a Kubernetes Server
55
=========================
66

7-
.. Warning::
8-
9-
This information is out of date. It will be updated soon.
107

118
.. Note::
129

13-
**DLS Users**: DLS already has the test cluster Pollux and further
14-
beamline and machine clusters are coming soon.
15-
16-
To use the Pollux cluster, run ``module load pollux`` outside of the
17-
devcontainer and then run the script ``.devcontainer/dls-copy-k8s-crt.sh``
10+
**DLS Users**: DLS already has the test cluster Pollux which includes
11+
the test beamline p46 and the training beamlines p46 through to p49.
1812

19-
The Pollux Cluster already has a beamline namespace ``bl01t``
20-
for you to use as a training area. *You will need
21-
to ask SciComp to add you as a user of this namespace.*
22-
Please be aware that this is a shared resource so others might be using
23-
it at the same time.
13+
We have also started to roll out production clusters for some of our
14+
beamlines. To date we have clusters for p38, i20, i22 and c01.
2415

25-
The Pollux Cluster already has the Kubernetes dashboard installed.
26-
To access it go to http://pollux.diamond.ac.uk and click
27-
``Pollux K8S Dashboard``.
28-
29-
Then select ``bl01t`` from the namespace drop down menu in the top left,
30-
to see the training namespace.
16+
For this reason DLS users should skip this tutorial unless you have a
17+
spare linux machine with root access and an interest in how Clusters
18+
are created.
3119

3220
Introduction
3321
------------
@@ -39,7 +27,7 @@ Bring Your Own Cluster
3927
----------------------
4028

4129
If you already have a Kubernetes cluster then you can skip this section.
42-
and go straight to `./create_beamline`.
30+
and go straight to the next tutorial.
4331

4432
IMPORTANT: you will require appropriate permissions on the cluster to work
4533
with epics-containers. In particular you will need to be able to create
@@ -137,17 +125,18 @@ uses a namespace for each beamline or accelerator domain.
137125
A context is a combination of a cluster, namespace, and user. It tells kubectl
138126
which cluster and namespace to use when communicating with the Kubernetes API.
139127

140-
So here we will create a namespace for our first test beamline BEAMLINE TEST 01
141-
or bl01t for short. We will also create a context for this namespace and set
142-
it as the default context.
128+
Here we will create a namespace for our first test beamline bl45p. We are
129+
using this name because it is the name of the first ever Kubernetes beamline
130+
at DLS. This just means I can use some of the following tutorials for both
131+
DLS and non-DLS users.
143132

144133
From the workstation INSIDE the devcontainer execute the following:
145134

146135
.. code-block:: bash
147136
148-
kubectl create namespace bl01t
149-
kubectl config set-context bl01t --namespace=bl01t --user=default --cluster=default
150-
kubectl config use-context bl01t
137+
kubectl create namespace bl45p
138+
kubectl config set-context bl45p --namespace=bl45p --user=default --cluster=default
139+
kubectl config use-context bl45p
151140
152141
Create a service account to run the IOCs
153142
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -163,7 +152,7 @@ Create the account:
163152
apiVersion: v1
164153
kind: ServiceAccount
165154
metadata:
166-
name: bl01t-priv
155+
name: bl45p-priv
167156
EOF
168157
169158
Generate a login token for the account:
@@ -174,9 +163,9 @@ Generate a login token for the account:
174163
apiVersion: v1
175164
kind: Secret
176165
metadata:
177-
name: bl01t-priv-secret
166+
name: bl45p-priv-secret
178167
annotations:
179-
kubernetes.io/service-account.name: bl01t-priv
168+
kubernetes.io/service-account.name: bl45p-priv
180169
type: kubernetes.io/service-account-token
181170
EOF
182171
@@ -195,3 +184,4 @@ simply use this command:
195184
k3s-uninstall.sh
196185
197186
If you are interested in looking at the k3s files see **/var/lib/rancher/k3s/**.
187+

0 commit comments

Comments
 (0)