Setting up a Kubernetes environment (k3s) on RHEL
You must set up a Kubernetes environment (k3s) so that you can install the server software on the RHEL Server. You can use the script that is provided with HCL OneTest™ Server to set up a Kubernetes environment (k3s).
Before you begin
You must have completed the following tasks:
-
Installed the following software:
-
OpenSSH server
-
Helm
-
-
Ensured that your computer has a Domain Name Server (DNS) resolvable hostname to resolve the hostname into a machine-readable IP address.
Procedure
- Log in to the RHEL server using an SSH session.
-
Add the software registry to Helm by running the following command:
helm repo add hclsoftware https://hclcr.io/chartrepo/ot
-
Run the following command to get the latest updates from the repository:
helm repo update
-
Run the following commands to fetch the scripts that are used to install
Kubernetes:
helm pull --untar hclsoftware/hcl-onetest-base --version 13.1054.0 chmod +x hcl-onetest-base/*.sh
-
Perform one of the steps described in the following table to install the k3s
Kubernetes environment based on your requirement:
Where:
-
{onetest.} is a sub-domain name that you specified for the server. For example, testenv.Note: The sub-domain must consist of lowercase alphanumeric characters,
-
(hyphen) or.
(period). Also, the value must start and end with an alphanumeric character. -
myorg.com is the domain name of your organization. For example, hcl.com
You can access the product through a web browser by using any of the following methods:-
Fully Qualified Hostname: When the server is configured, you can use hostname -f command to get the fully qualified hostname defined in the DNS to access HCL OneTest™ Server. For example, onetest.myorg.com
-
IP address: You can use the IP address to access HCL OneTest™ Server when you cannot create a specific DNS record for the server. For example, ip-address.nip.io.
On completion of the k3s-init.sh script, the output displays the following information on the command-line interface:
-
The INGRESS_DOMAIN that is in use. This is the URL from where you can access HCL OneTest™ Server. You must use this value for the global.hclOneTestIngressDomain parameter in step 3 in the server installation topic.
-
The DNS information that the Kubernetes cluster uses to resolve names.
-
Certificate Authority (CA) that you must import into the browser to prevent certificate errors.
-
Instructions to confirm whether the Kubernetes environment has started.
You can refer to the What to do next section for more details on how to verify that the Kubernetes environment has started.
-
-
Perform one of the following options to configure a firewall:
-
Run the following script to configure the firewall that allows traffic on cni0 and port 443:
$ sudo HOME=$HOME ./ubuntu-firewall.shNote: You must consult your network administrator before you run this script, and confirm whether the firewall is compatible with your corporate policy. -
Update the firewall that allows traffic on cni0 and port 443, if your RHEL server is already configured with the firewall.
-
Results
What to do next
-
Log in to the server host system again after the installation process is completed so that changes to the group membership are applied.
Note: You can run the kubectl get pods -A command to verify that the Kubernetes environment is working. After a while, the status of the pods display a Running or Complete state. -
Install the server software. See Installing the server software on RHEL by using k3s.