Steps to add a worker node to an OpenShift 4 cluster on cloudscale.ch.

## Starting situation

• You already have an OpenShift 4 cluster on cloudscale.ch

• You want to add a worker node to the cluster

## Prerequisites

The following CLI utilities need to be available locally:

• `kubectl`

• `yq`

## Update Cluster Config

1. Update cluster config in syn-tenant-repo on a new branch.

``````CLUSTER_ID=

yq eval -i ".parameters.openshift4_terraform.terraform_variables.worker_count += 1" \
${CLUSTER_ID}.yml`````` 2. Commit and create MR to review ``````git commit -a -m "Add worker node to cluster${CLUSTER_ID}"
3. Compile and push the cluster catalog.

## Create Node

1. Verify output of the Terraform plan step (for example, check the output of the Terraform CI/CD pipeline in cluster catalog)

2. If everything looks good, run `terraform apply` (for example, by triggering the apply step in the CI/CD pipeline).

## Approve CertificateSigningRequests

``````# Once CSRs in state Pending show up, approve them
# Needs to be run twice, two CSRs for each node need to be approved

``kubectl get node``
2. Add `app` role label to the node
``kubectl --as=cluster-admin label node worker-XXXX node-role.kubernetes.io/app=""``