Rancher tries to achieve its goals safely and conveniently. To do so, it incorporates features like access control, Prometheus and Grafana integrations, live usage observability tools, and centralized authentication. Rancher tries to provide unified cluster oversight. Each application automatically leverages global DNS, and the tool takes regular snapshots to keep deployments as failure-proof as possible. Administrators can conduct sweeping compliance audits and apply access policies at the group or user level. Rancher also works to optimize usability. When deploying applications, you can use Helm or the official Rancher App Catalog. For instance, the GUI can handle security policies, audit logs, and performance oversight regardless of whether your target clusters are local or remote. One of Rancher's biggest draws lies in its potential to trim down your workflow. After deploying a cluster, the tool tracks its health using Prometheus. For instance, Rancher can automatically deploy and configure key K8s components. Feel free to post your queries and feedback in below comments section.Rancher claims to strengthen Kubernetes by embedding it in a higher-level management abstraction that handles common tasks. That’s all from this guide, we hope you have found it informative and useful. $ curl Great, output above confirms that our k3s Kubernetes cluster is working fine as we able to access our nginx sample application. Now try to access above deployed nginx application using curl command. $ kubectl expose deployment nginx-web -type NodePort -port 80 $ kubectl create deployment nginx-web -image nginx -replicas 2Įxpose the above created deployment with NodePort type. To test k3s Kubernetes cluster installation, lets deploy a nginx based application, run beneath command from master node. 7) Test K3s Kubernetes Cluster Installation Perfect, above output confirms that worker nodes have joined the cluster successfully. Now head back to master node and run ‘ kubectl get node‘ command to verify whether worker nodes have joined the cluster or not. ![]() Now login to the worker nodes, run beneath command. Retrieve it from the master node: $ sudo cat /var/lib/rancher/k3s/server/node-tokenĬopy the token as you will need it in the next steps. The K3s installation generates a token for worker nodes to join the cluster. ![]() 6) Join Worker Nodes to K3s Kubernetes Cluster In the next step, we will join our two worker nodes to this cluster. Output above confirms that our master node is in Ready State and also Control plane, CoreDNS and Metrics-server are up and running. Now, try to get node and cluster information using beneath kubectl commands. $ sudo cp /etc/rancher/k3s/k3s.yaml ~/.kube/config In order to interact with Kubernetes cluster, we must configure kubectl utility, execute the following set of commands on master node. Post k3s successful installation, verify k3s service using following command. This script installs K3s and starts the service automatically. Run following command on master node only, $ curl -sfL | sh. $ sudo dnf install curl wget -y 4) Download and Install Kubernetes Cluster Using K3s on RHEL 9 | 8 Install curl and wget on each node using the following dnf command. $ sudo firewall-cmd -reload 3) Install Required Tools $ sudo firewall-cmd -permanent -add-port=8472/udp $ sudo firewall-cmd -permanent -zone=trusted -add-source=10.43.0.0/16Īdd following ports in the firewall on worker nodes. $ sudo firewall-cmd -permanent -zone=trusted -add-source=10.42.0.0/16 $ sudo firewall-cmd -permanent -add-port=51821/udp $ sudo firewall-cmd -permanent -add-port=51820/udp $ sudo firewall-cmd -permanent -add-port=10250/tcp ![]() $ sudo firewall-cmd -permanent -add-port=6443/tcp In case firewall is enabled on your RHEL systems, then allow following ports in firewall on the master node. $ sudo hostname set-hostname "k3s-worker02" & exec bash // Run on VM3Īdd the following entries in /etc/hosts file on each node. $ sudo hostname set-hostname "k3s-worker01" & exec bash // Run on VM2 $ sudo hostnamectl set-hostname "k3s-master" & exec bash // Run on VM1 1) Set Hostname on Each NodeĪs we are using three node, one master and two worker nodes, set their respective hostname using hostnamectl command. Without any further delay, lets jump into Kubernetes installation using k3s.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |