Deploying Kubernetes clusters for build automation - RedpointGames/uet GitHub Wiki
UET now includes the Redpoint Kubernetes Manager (RKM), which can be used to run Kubernetes clusters consisting of Windows and Linux nodes. This makes it ideal for orchestrating build runners and upgrade scripts across your fleet of machines.
Cluster security notes
⚠️⚠️ Kubernetes clusters set up by RKM are intended to be used on trusted networks with trusted workloads. ⚠️⚠️
You should not expose services running inside the cluster to the Internet, nor should you build or execute untrusted code within containers.
If you need to run Kubernetes with higher security guarantees or expose services to the Internet, please consider something like k3s.
Creating a cluster
To create a new Kubernetes cluster, you'll need at least one Linux machine on your local network that can run as the controller. Some Kubernetes components only run on Linux, so you need at least one Linux machine.
On that machine, run:
curl -o uet -L https://github.com/RedpointGames/uet/releases/latest/download/uet.linux && \
chmod a+x ./uet && \
sudo ./uet upgrade && \
sudo /opt/UET/Current/uet cluster start
Joining additional nodes to the cluster
To join additional Linux machines to the cluster, run the same command as in Creating a cluster.
To join one or more Windows machines to the cluster, run uet cluster start from an Administrative command prompt.
In both cases, RKM will automatically detect the existing cluster and join it.
Connecting to your cluster from kubectl
RKM will create a kubeconfig for an initial admin user when the cluster is first created.
To connect to your cluster via kubectl, on the machine that first ran uet cluster start, run:
cat /opt/rkm/*/kubeconfigs/users/user-admin.kubeconfig
This will give you a kubeconfig file that you can download to your local machine. You can either merge the contents into your local ~/.kube/config file, or use it directly by setting the KUBECONFIG=path/to/user-admin.kubeconfig environment variable.
Upgrading the cluster
To upgrade the cluster:
- Run
uet upgradethenuet cluster starton the controller machine (the first machine that ranuet cluster start), and make sure the service starts up again successfully. - Then run
uet upgradeanduet cluster starton each joined machine.