Installation of OTH Kubernetes Controller
Prerequisites
Before following these instructions make sure, that:
kubectl
is configured against the desired kubernetes cluster.- The kubernetes cluster is at least version 1.21 or newer.
Instructions
To install the latest version of the OTH Kubernetes Controller do the following:
export VERSION=latest
curl -o oth-operator.yaml https://public.oth.io/software/kubernetes/oth-controller/$VERSION/deploy.yaml
kubectl apply -f oth-operator.yaml
If the always newest version is wanted the latest
can be used as version
.
Expect output similar to this:
namespace/oth-operator-system created
customresourcedefinition.apiextensions.k8s.io/oths.k8s.oth.io created
serviceaccount/oth-operator-controller-manager created
role.rbac.authorization.k8s.io/oth-operator-leader-election-role created
clusterrole.rbac.authorization.k8s.io/oth-operator-manager-role created
clusterrole.rbac.authorization.k8s.io/oth-operator-metrics-reader created
clusterrole.rbac.authorization.k8s.io/oth-operator-proxy-role created
rolebinding.rbac.authorization.k8s.io/oth-operator-leader-election-rolebinding created
clusterrolebinding.rbac.authorization.k8s.io/oth-operator-manager-rolebinding created
clusterrolebinding.rbac.authorization.k8s.io/oth-operator-proxy-rolebinding created
configmap/oth-operator-manager-config created
service/oth-operator-controller-manager-metrics-service created
deployment.apps/oth-operator-controller-manager created
The step presented above does the following:
- Setups the Custom Resource Defitions (CRD) for the oth types
- Creates namespace for the operator to run in
- Creates a service account for the controller
- Makes the service account cluster admin
- Installs the image for the controller
Verification
In order to verify that the controller is installed correctly, check the following:
kubectl -n oth-operator-system get all
It should produce something like this:
NAME READY STATUS RESTARTS AGE
pod/oth-operator-controller-manager-b9f447678-9drh2 2/2 Running 0 49s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/oth-operator-controller-manager-metrics-service ClusterIP 10.96.124.90 <none> 8443/TCP 49s
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/oth-operator-controller-manager 1/1 1 1 49s
NAME DESIRED CURRENT READY AGE
replicaset.apps/oth-operator-controller-manager-b9f447678 1 1 1 49s
Installing oth-k8s-bootstrap
The tool can be installed like so:
export TARGET_OS=linux # or macos, or windows
export VERSION=2.70
curl -o oth-k8s-bootstrap https://public.oth.io/software/kubernetes/oth-controller/$VERSION/oth-k8s-bootstrap.$TARGET_OS
chmod +x oth-k8s-bootstrap
sudo mv oth-k8s-bootstrap /usr/local/bin/.