<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>rancher Archives - ServerStadium</title>
	<atom:link href="https://serverstadium.com/knowledge-base/tag/rancher/feed/" rel="self" type="application/rss+xml" />
	<link>https://serverstadium.com/knowledge-base/tag/rancher/</link>
	<description>Public Cloud Solution by ServerStadium</description>
	<lastBuildDate>Thu, 20 Apr 2023 00:28:47 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.4</generator>

<image>
	<url>https://serverstadium.com/wp-content/uploads/2023/04/cropped-favicon-1-32x32.png</url>
	<title>rancher Archives - ServerStadium</title>
	<link>https://serverstadium.com/knowledge-base/tag/rancher/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>High Availability Kubernetes Using RKE in ServerStadium Part 2</title>
		<link>https://serverstadium.com/knowledge-base/high-availability-kubernetes-using-rke-in-serverstadium-part-2/</link>
		
		<dc:creator><![CDATA[Brian K]]></dc:creator>
		<pubDate>Sat, 30 Oct 2021 05:22:47 +0000</pubDate>
				<guid isPermaLink="false">https://cloudraya.com/knowledge-base/?p=1551</guid>

					<description><![CDATA[<p>After we complete installing Kubernetes on Part 1, we can continue to install the Rancher.Rancher has a nice Web UI in which we can manage our Kubernetes cluster. There are several ways to install Rancher on the server: Install Rancher in standalone docker Install Rancher as a container under Kubernetes cluster itself In this tutorial,&#8230;</p>
<p>The post <a href="https://serverstadium.com/knowledge-base/high-availability-kubernetes-using-rke-in-serverstadium-part-2/">High Availability Kubernetes Using RKE in ServerStadium Part 2</a> appeared first on <a href="https://serverstadium.com">ServerStadium</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">After we complete installing Kubernetes <strong><a href="https://serverstadium.com/knowledge-base/high-availability-kubernetes-using-rke-in-serverstadium-part-1/" target="_blank" rel="noreferrer noopener">on Part 1</a></strong>, we can continue to install the Rancher.<br />Rancher has a nice Web UI in which we can manage our Kubernetes cluster. There are several ways to install Rancher on the server:</p>



<ol class="wp-block-list" type="1">
<li>Install Rancher in standalone docker</li>
<li>Install Rancher as a container under Kubernetes cluster itself</li>
</ol>



<p class="wp-block-paragraph">In this tutorial, we will install Rancher as a container deployed on the Kubernetes cluster on every node. If one of the servers is down, we can still access Rancher from our end.</p>



<p class="wp-block-paragraph">Before we install the rancher, we need to install helm on the server.<br />Helm is package management for Kubernetes like apt. Please install Helm from the latest source, or we can install it using snap package on Ubuntu.</p>



<pre class="wp-block-code"><code># snap install helm --classic</code></pre>



<figure class="wp-block-image size-large is-resized"><img decoding="async" class="wp-image-1401" src="https://serverstadium.com/wp-content/uploads/2021/09/image-9.png" alt="" width="211" height="17" /></figure>



<h2 class="has-vivid-cyan-blue-color has-text-color wp-block-heading"><strong>Add Stable Rancher Chart</strong></h2>



<p class="wp-block-paragraph">After we install Helm, we can add the Helm chart repository. In this tutorial, we will use the stable repository.</p>



<pre class="wp-block-code"><code># helm repo add rancher-stable https://releases.rancher.com/server-charts/stable</code></pre>



<figure class="wp-block-image size-large"><img decoding="async" class="wp-image-1403" src="https://serverstadium.com/wp-content/uploads/2021/09/image-10.png" alt="" /></figure>



<h2 class="has-vivid-cyan-blue-color has-text-color wp-block-heading"><strong>Create a Namespace for Rancher: cattle-system</strong></h2>



<p class="wp-block-paragraph">The next step creates Kubernetes namespace with the name cattle-system where the Chart will be installed.<br />Namespace helps us organize clusters into virtual sub-clusters and is helpful when working with another team or sharing the project on the Kubernetes cluster.</p>



<pre class="wp-block-code"><code>#kubectl create namespace cattle-system</code></pre>



<figure class="wp-block-image size-large"><img decoding="async" class="wp-image-1404" src="https://serverstadium.com/wp-content/uploads/2021/09/image-11.png" alt="" /></figure>



<h2 class="has-vivid-cyan-blue-color has-text-color wp-block-heading"><strong>Install Cert-Manager</strong></h2>



<p class="wp-block-paragraph">Rancher management is designed to use SSL/ TLS for a secure connection. There are three recommended options for TLS termination for Rancher.</p>



<ul class="wp-block-list">
<li>Rancher-generated TLS certificate. This option needs to install cert-manager into the cluster. Cert-manager will issue and maintain the certificate for Rancher, including generating CA certificate and signing the cert.</li>
<li>Let’s encrypt. This option also needs cert-manager and combine with Issuer Let’s Encrypt to issue cert for rancher.</li>
<li>Using own certificate. This option allows you to use private or public CA-signed certificate.</li>
</ul>



<p class="wp-block-paragraph">In this tutorial, we will use the option Rancher-generated TLS cert.</p>



<pre class="wp-block-code"><code># kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v1.0.4/cert-manager.crds.yaml</code></pre>



<figure class="wp-block-image size-large"><img decoding="async" class="wp-image-1405" src="https://serverstadium.com/wp-content/uploads/2021/09/image-12.png" alt="" /></figure>



<p class="wp-block-paragraph">Create a namespace for cert-manager.</p>



<pre class="wp-block-code"><code># kubectl create namespace cert-manager</code></pre>



<figure class="wp-block-image size-large"><img decoding="async" class="wp-image-1406" src="https://serverstadium.com/wp-content/uploads/2021/09/image-13.png" alt="" /></figure>



<p class="wp-block-paragraph">Add the Jetstack Helm repository.</p>



<pre class="wp-block-code"><code># helm repo add jetstack https://charts.jetstack.io</code></pre>



<figure class="wp-block-image size-large"><img decoding="async" class="wp-image-1407" src="https://serverstadium.com/wp-content/uploads/2021/09/image-14.png" alt="" /></figure>



<p class="wp-block-paragraph">Update the local helm chart repository.</p>



<pre class="wp-block-code"><code># helm repo update</code></pre>



<figure class="wp-block-image size-large"><img decoding="async" class="wp-image-1412" src="https://serverstadium.com/wp-content/uploads/2021/09/image-17.png" alt="" /></figure>



<p class="wp-block-paragraph">Now we can install the cert-manager</p>



<pre class="wp-block-code"><code>#helm install cert-manager jetstack/cert-manager  --namespace cert-manager</code></pre>



<figure class="wp-block-image size-large"><img decoding="async" class="wp-image-1413" src="https://serverstadium.com/wp-content/uploads/2021/09/image-18.png" alt="" /></figure>



<p class="wp-block-paragraph">List pods status on cert-manager. Make sure all pods are running</p>



<pre class="wp-block-code"><code># kubectl get pods --namespace cert-manager</code></pre>



<figure class="wp-block-image size-large"><img decoding="async" class="wp-image-1414" src="https://serverstadium.com/wp-content/uploads/2021/09/image-19.png" alt="" /></figure>



<h2 class="has-vivid-cyan-blue-color has-text-color wp-block-heading"><strong>Install Rancher Using Rancher-Generated Certificate</strong></h2>



<p class="wp-block-paragraph">We are ready to install rancher using self-sign certificate. We will use domain rancher.serverstadium.com for self-generated certificate just for this tutorial. Please use the following command to install Rancher.</p>



<pre class="wp-block-code"><code># helm install rancher rancher-stable/rancher --namespace cattle-system --set hostname=rancher.serverstadium.com</code></pre>



<figure class="wp-block-image size-large"><img decoding="async" class="wp-image-1415" src="https://serverstadium.com/wp-content/uploads/2021/09/image-20.png" alt="" /></figure>



<p class="wp-block-paragraph">Monitor the deployment status using the following command.</p>



<pre class="wp-block-code"><code>#kubectl -n cattle-system rollout status deploy/rancher</code></pre>



<figure class="wp-block-image size-large"><img decoding="async" class="wp-image-1416" src="https://serverstadium.com/wp-content/uploads/2021/09/image-21.png" alt="" /></figure>



<p class="wp-block-paragraph">After Rancher has been rolled out successfully. We can continue to the next step.</p>



<figure class="wp-block-image size-large"><img decoding="async" class="wp-image-1417" src="https://serverstadium.com/wp-content/uploads/2021/09/image-22.png" alt="" /></figure>



<pre class="wp-block-code"><code># kubectl -n cattle-system get deploy rancher</code></pre>



<figure class="wp-block-image size-large"><img decoding="async" width="441" height="42" class="wp-image-1418" src="https://serverstadium.com/wp-content/uploads/2021/09/image-23.png" alt="" srcset="https://serverstadium.com/wp-content/uploads/2021/09/image-23.png 441w, https://serverstadium.com/wp-content/uploads/2021/09/image-23-300x29.png 300w" sizes="(max-width: 441px) 100vw, 441px" /></figure>



<h2 class="has-vivid-cyan-blue-color has-text-color wp-block-heading"><strong>Add Port of Rancher to Load Balancer</strong></h2>



<p class="wp-block-paragraph">Now Rancher has already deployed on the server, the next step is to configure the Rancher Web UI using Load Balancer in ServerStadium Cloud.<br />Please Click Networking – Load Balancer, then Click Add New Load Balancer with the name rancher80. Fill in the field for the new load balancer as follow:</p>



<figure class="wp-block-image size-large"><img decoding="async" class="wp-image-1450" src="https://serverstadium.com/wp-content/uploads/2021/09/image-52.png" alt="" /></figure>



<figure class="wp-block-image size-large"><img decoding="async" class="wp-image-1451" src="https://serverstadium.com/wp-content/uploads/2021/09/image-53.png" alt="" /></figure>



<p class="wp-block-paragraph">After Load Balancer has been created with the name rancher80, edit the Load Balancer to assign it to All nodes.</p>



<figure class="wp-block-image size-large"><img decoding="async" class="wp-image-1425" src="https://serverstadium.com/wp-content/uploads/2021/09/image-30.png" alt="" /></figure>



<p class="wp-block-paragraph">Click the Assign New VM button the choose node1, node2 and ndoe3</p>



<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="501" height="243" class="wp-image-1426" src="https://serverstadium.com/wp-content/uploads/2021/09/image-31.png" alt="" srcset="https://serverstadium.com/wp-content/uploads/2021/09/image-31.png 501w, https://serverstadium.com/wp-content/uploads/2021/09/image-31-300x146.png 300w" sizes="(max-width: 501px) 100vw, 501px" /></figure>



<p class="wp-block-paragraph">Add new Load Balancer for port 443 with name rancher443</p>



<figure class="wp-block-image size-large"><img decoding="async" class="wp-image-1427" src="https://serverstadium.com/wp-content/uploads/2021/09/image-32.png" alt="" /></figure>



<p class="wp-block-paragraph">Edit rancher443, then assign all nodes to the load balancer as we did on rancher80.</p>



<h2 class="has-vivid-cyan-blue-color has-text-color wp-block-heading"><strong>Access from Browser</strong></h2>



<p class="wp-block-paragraph">Don’t forget to create A record of your rancher domain to the Public IP of the Load Balancer.<br />After that, you can browse the domain name from your browser. In this tutorial, we use rancher.serverstadium.com</p>



<figure class="wp-block-image size-large"><img decoding="async" class="wp-image-1428" src="https://serverstadium.com/wp-content/uploads/2021/09/image-33.png" alt="" /></figure>



<p class="wp-block-paragraph">Please click Proceed if you get the warning message. Insert your password, then choose default View with Multiple Cluster.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="450" height="312" class="wp-image-1429" src="https://serverstadium.com/wp-content/uploads/2021/09/image-34.png" alt="" srcset="https://serverstadium.com/wp-content/uploads/2021/09/image-34.png 450w, https://serverstadium.com/wp-content/uploads/2021/09/image-34-300x208.png 300w" sizes="(max-width: 450px) 100vw, 450px" /></figure>



<p class="wp-block-paragraph">Insert the Rancher Server URL</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="458" height="290" class="wp-image-1430" src="https://serverstadium.com/wp-content/uploads/2021/09/image-35.png" alt="" srcset="https://serverstadium.com/wp-content/uploads/2021/09/image-35.png 458w, https://serverstadium.com/wp-content/uploads/2021/09/image-35-300x190.png 300w" sizes="(max-width: 458px) 100vw, 458px" /></figure>



<figure class="wp-block-image size-large"><img decoding="async" class="wp-image-1431" src="https://serverstadium.com/wp-content/uploads/2021/09/image-36.png" alt="" /></figure>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="612" height="219" class="wp-image-1432" src="https://serverstadium.com/wp-content/uploads/2021/09/image-37.png" alt="" srcset="https://serverstadium.com/wp-content/uploads/2021/09/image-37.png 612w, https://serverstadium.com/wp-content/uploads/2021/09/image-37-300x107.png 300w" sizes="(max-width: 612px) 100vw, 612px" /></figure>



<p class="wp-block-paragraph">In the next article, we can deploy a simple application and learn how to add helm repository through Rancher.</p>



<p class="wp-block-paragraph">You can <strong><a href="https://serverstadium.com/knowledge-base/high-availability-kubernetes-using-rke-in-serverstadium-part-1/" target="_blank" rel="noreferrer noopener">re-read Part 1</a></strong> to make sure you did not miss anything.<br />Next, we will continue to deploy simple applicationa in Kubernetes <strong><a href="https://serverstadium.com/knowledge-base/high-availability-kubernetes-using-rke-in-serverstadium-part-3/" target="_blank" rel="noreferrer noopener">part 3</a></strong></p>
<p>The post <a href="https://serverstadium.com/knowledge-base/high-availability-kubernetes-using-rke-in-serverstadium-part-2/">High Availability Kubernetes Using RKE in ServerStadium Part 2</a> appeared first on <a href="https://serverstadium.com">ServerStadium</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>High Availability Kubernetes Using RKE in ServerStadium Part 1</title>
		<link>https://serverstadium.com/knowledge-base/high-availability-kubernetes-using-rke-in-serverstadium-part-1/</link>
		
		<dc:creator><![CDATA[Brian K]]></dc:creator>
		<pubDate>Wed, 27 Oct 2021 07:22:51 +0000</pubDate>
				<guid isPermaLink="false">https://cloudraya.com/knowledge-base/?p=1387</guid>

					<description><![CDATA[<p>Kubernetes is an Opensource platform that manages workloads or containerized applications on servers.Google first developed this platform. Now it’s managed by the Cloud Native Computing Foundation (CNCF). In short, Its function is to make us easy to configure, deploy, manage, or monitor the largest scale of a containerized application in different deployment environments. Before we&#8230;</p>
<p>The post <a href="https://serverstadium.com/knowledge-base/high-availability-kubernetes-using-rke-in-serverstadium-part-1/">High Availability Kubernetes Using RKE in ServerStadium Part 1</a> appeared first on <a href="https://serverstadium.com">ServerStadium</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Kubernetes is an Opensource platform that manages workloads or containerized applications on servers.<br />Google first developed this platform. Now it’s managed by the Cloud Native Computing Foundation (CNCF).</p>



<p class="wp-block-paragraph">In short, Its function is to make us easy to configure, deploy, manage, or monitor the largest scale of a containerized application in different deployment environments.</p>



<p class="wp-block-paragraph">Before we talk about containers, let&#8217;s talk about Docker because Docker is a popular application that is often used with Kubernetes.</p>



<p class="wp-block-paragraph">Docker is an open-source application that only uses the required program and elements that a program needs to be a complete unit as an image.  We can use that image to run an application like Nginx, WordPress, etc.<br />The collection of these images we will call a Container.</p>



<p class="wp-block-paragraph">The container will run on a pod, where the pod is the smallest deployable unit in Kubernetes.<br />Installing Kubernetes is tricky because there are multiple ways to install it. Also, Kubernetes deployments container creation is not limited to using docker. We can use another container runtime like CoreOS, Mesos, LXC, Podman, etc.<br /><br />In RKE1 (Rancher Kubernetes Engine), we will use Docker as the container runtime to deploy Kubernetes with simple installation.</p>



<p class="wp-block-paragraph">RKE1 is a CNCF-certified Kubernetes distribution that runs within Docker Container, and it will make us easier to install Kubernetes in our infrastructure with a single YAML file.<br /><br />After Kubernetes has been installed, we will install Rancher to manage it.<br />Rancher has a nice web UI that we can use to add, manage, monitor, remove the nodes, create a deployment, create the persistent volume of Kubernetes, and many things.</p>



<p class="wp-block-paragraph">In Part 1, we will deploy Kubernetes in ServerStadium Cloud as follow:</p>



<ul class="wp-block-list">
<li>Launch at least 3 VM on the ServerStadium Cloud for High Availability workload.</li>
<li>Enable SSH passwordless login for each Kubernetes node.</li>
<li>Install docker on each node.</li>
<li>Download RKE binary file and configure the Kubernetes.</li>
</ul>



<h2 class="has-vivid-cyan-blue-color has-text-color wp-block-heading"><strong>Launch at Least 3 VM on ServerStadium Cloud for High Availability Workload</strong></h2>



<p class="wp-block-paragraph">For High Availability Kubernetes, we need three VMs as Kubernetes nodes in ServerStadium Cloud. Below is the specification for every node:</p>



<p class="wp-block-paragraph">Operating System: Ubuntu 20.04<br />Memory: 4GB<br />CPU: 2 Core<br />Disk: 20 GB<br />Public IP Address only for node1 because we will install RKE from node1. <br />For node2 and node3, we only need the Private IP Address.</p>



<p class="wp-block-paragraph">Below is the IP Address of every node:<br /><strong>node1 :</strong><br />Public IP Address: 198.167.141.249<br />Private IP Address: 10.1.1.205</p>



<p class="wp-block-paragraph"><strong>node2:</strong><br />Private IP Address: 10.1.1.47</p>



<p class="wp-block-paragraph"><strong>node3 : </strong><br />Private IP Address: 10.1.1.238</p>



<h2 class="has-vivid-cyan-blue-color has-text-color wp-block-heading"><strong>Enable SSH Passwordless Login for Each Kubernetes Node</strong></h2>



<p class="wp-block-paragraph">Before deploying RKE on the server, we must enable SSH passwordless for easy installation with a custom domain internal. Instead of remembering the IP Address, it&#8217;s easy to remember the node using its names.</p>



<pre class="wp-block-code"><code># vim /etc/hosts</code></pre>



<figure class="wp-block-image size-large"><img decoding="async" class="wp-image-1389" src="https://serverstadium.com/wp-content/uploads/2021/09/image.png" alt="" /></figure>



<p class="wp-block-paragraph">Let’s generate the ssh key pair using the following command.</p>



<pre class="wp-block-preformatted"># ssh-keygen</pre>



<figure class="wp-block-image size-large is-resized"><img loading="lazy" decoding="async" class="wp-image-1390" src="https://serverstadium.com/wp-content/uploads/2021/09/image-1.png" alt="" width="396" height="227" /></figure>



<p class="wp-block-paragraph">After generating the ssh keypair is completed, we can upload the Public key to each node using command ssh-copy-id<br />Please run the following command from node1.</p>



<pre class="wp-block-code"><code># ssh-copy-id node3
# ssh-copy-id node2
# ssh-copy-id node1</code></pre>



<figure class="wp-block-image size-large is-resized"><img loading="lazy" decoding="async" class="wp-image-1391" src="https://serverstadium.com/wp-content/uploads/2021/09/image-2.png" alt="" width="666" height="151" /></figure>



<p class="wp-block-paragraph"><strong>Install docker on each node</strong>:<strong><br /></strong>Since we need docker for Kubernetes, we will install it on every node using the following command:</p>



<p class="wp-block-paragraph">Firstly, we need to update our repository and allow our server to access the Docker repository using HTTPS</p>



<pre class="wp-block-preformatted">sudo apt-get update &amp;&amp; sudo apt-get install apt-transport-https ca-certificates curl software-properties-common -y</pre>



<p class="wp-block-paragraph">Add a GPG key to ensure the authenticity of the software package</p>



<pre class="wp-block-preformatted"># curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -</pre>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="790" height="33" class="wp-image-1567" src="https://serverstadium.com/wp-content/uploads/2021/10/image.png" alt="" srcset="https://serverstadium.com/wp-content/uploads/2021/10/image.png 790w, https://serverstadium.com/wp-content/uploads/2021/10/image-300x13.png 300w, https://serverstadium.com/wp-content/uploads/2021/10/image-768x32.png 768w" sizes="(max-width: 790px) 100vw, 790px" /></figure>



<p class="wp-block-paragraph">Now, we can add Docker repository to our server and then install the stable Docker version using the following command :</p>



<pre id="block-0b46ee22-d40b-468e-90a2-cd60d24891a7" class="wp-block-preformatted"># sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" 

# sudo apt-get update &amp;&amp; sudo apt-get install docker-ce containerd.io -y</pre>



<h2 class="has-vivid-cyan-blue-color has-text-color wp-block-heading"><strong>Download RKE Binary File and Configure the Kubernetes</strong></h2>



<p class="wp-block-paragraph">Before we deploy Kubernetes on the server, we need to download rke binary from the following link.<br />Download latest rke from <a href="https://github.com/rancher/rke/releases/">https://github.com/rancher/rke/releases/</a></p>



<pre class="wp-block-code"><code># wget https://github.com/rancher/rke/releases/download/v1.2.12/rke_linux-amd64</code></pre>



<p class="wp-block-paragraph">Rename the file as rke</p>



<pre class="wp-block-code"><code> # mv rke_linux-amd64 rke</code></pre>



<p class="wp-block-paragraph">Then, make rke as executable file</p>



<pre class="wp-block-code"><code># chmod +x rke</code></pre>



<p class="wp-block-paragraph">In ServerStadium Cloud, we will create a simple cluster from three nodes using the following yml.</p>



<p class="wp-block-paragraph">Create a simple cluster.yml</p>



<pre class="wp-block-code"><code>nodes:
    - address: node1
      user: root
      internal_address: 10.1.1.205
      role: [controlplane, etcd, worker]
    - address: node2
      user: root
      internal_address: 10.1.1.47
      role: [controlplane, etcd, worker]
    - address: node3
      user: root
      internal_address: 10.1.1.238
      role: [controlplane, etcd, worker]
services:
  etcd:
    snapshot: true
    creation: 6h
    retention: 24h
# Required for external TLS termination with
# ingress-nginx v0.22+
ingress:
  provider: nginx
  options:
    use-forwarded-headers: "true"

</code></pre>



<p class="wp-block-paragraph">Save the file, then we can continue to deploy Kubernetes using the command rke up. The installation will take around 10-15 minutes.</p>



<pre class="wp-block-code"><code># ./rke up</code></pre>



<figure class="wp-block-image size-large"><img decoding="async" class="wp-image-1394" src="https://serverstadium.com/wp-content/uploads/2021/09/image-3.png" alt="" /></figure>



<figure class="wp-block-image size-large"><img decoding="async" class="wp-image-1395" src="https://serverstadium.com/wp-content/uploads/2021/09/image-4.png" alt="" /></figure>



<p class="wp-block-paragraph">After the installation is completed. It will create three files, and please save them in a secure location:<br /><strong>rancher-cluster.yml</strong>: The RKE cluster configuration file that we have created previously.<br />kube_config_rancher-cluster.yml: The Kubeconfig file for the cluster.<br /><strong>rancher-cluster.rkestate</strong>: The Kubernetes Cluster State file</p>



<p class="wp-block-paragraph">If you want to know the status of the cluster node, we can use the kubectl command. <br />kubectl is a command-line tool that we can use to send a command to the Kubernetes cluster. <br />kubectl is authenticating with the Master node and making API calls to perform various management actions.<br />Copy the kube_config_rancher-cluster.yml as a config file. You can follow the following steps:</p>



<pre class="wp-block-code"><code># mkdir /root/.kube
# cp kube_config_cluster.yml /root/.kube/config</code></pre>



<figure class="wp-block-image size-large"><img decoding="async" class="wp-image-1396" src="https://serverstadium.com/wp-content/uploads/2021/09/image-5.png" alt="" /></figure>



<p class="wp-block-paragraph">Now, install kubectl on the master node</p>



<pre class="wp-block-preformatted"># snap install kubectl --classic</pre>



<figure class="wp-block-image size-large"><img decoding="async" class="wp-image-1570" src="https://serverstadium.com/wp-content/uploads/2021/10/image-1.png" alt="" /></figure>



<p class="wp-block-paragraph">Run kubectl command to get the status of the nodes</p>



<pre class="wp-block-code"><code>#kubectl get nodes</code></pre>



<figure class="wp-block-image size-large"><img decoding="async" class="wp-image-1398" src="https://serverstadium.com/wp-content/uploads/2021/09/image-7.png" alt="" /></figure>



<pre class="wp-block-code"><code>#kubectl get namespace</code></pre>



<figure class="wp-block-image size-large"><img decoding="async" class="wp-image-1399" src="https://serverstadium.com/wp-content/uploads/2021/09/image-8.png" alt="" /></figure>



<p class="wp-block-paragraph">Now it has been deployed. Next step, we will install Rancher to manage our Kubernetes Server.<br />Let&#8217;s go to continue to <strong><a href="https://serverstadium.com/knowledge-base/high-availability-kubernetes-using-rke-in-serverstadium-part-2/" target="_blank" rel="noreferrer noopener">the next part</a></strong></p>



<p class="wp-block-paragraph">&nbsp;</p>



<p class="wp-block-paragraph">&nbsp;</p>
<p>The post <a href="https://serverstadium.com/knowledge-base/high-availability-kubernetes-using-rke-in-serverstadium-part-1/">High Availability Kubernetes Using RKE in ServerStadium Part 1</a> appeared first on <a href="https://serverstadium.com">ServerStadium</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
