How To Create & Manage Kubernetes Cluster Using Linode

Reading Time: 4 minutes

Hello Readers ! Hope you all are doing well . Today, I am here with the new topic to learn that is Linode. So In this blog we’ll see the basic Introduction of Linode and How To Create & Manage Kubernetes Cluster Using Linode .

So Let’s get start !!!

INTRODUCTION

What Is Linode ?

Linode is a cloud hosting provider focused on providing Linux-based virtual machines to support a wide variety of applications. Given its roots, many experts do not consider it suitable for beginners.

The Linode Platform offers a variety of easy-to-use cloud solutions, all of which have clear and predictable pricing, and can be managed through an intuitive browser-based interface (the Cloud Manager), command line (the Linode CLI), or programmatically via an API (the Linode -API).

How To Create Cluster Using Linode

Here we have following steps to create cluster using Linode, these are as follows:

STEP 1: Install kubectl

You need to install the kubectl client to your computer before proceeding. Follow the steps corresponding to your computer’s operating system:

  • Download the latest kubectl release:
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s 

https://storage.googleapis.com/kubernetes-

release/release/stable.txt)/bin/linux/amd64/kubectl
  • Make the downloaded file executable:
chmod +x ./kubectl
  • Move the command into your PATH:
sudo mv ./kubectl /usr/local/bin/kubectl

NOTE: You can also install kubectl via your package manager, visit the Kubernetes documentation for instructions.

STEP 2: Create an LKE Cluster

  1. Log into your Linode Cloud Manager account.
  2. From the Linode dashboard, click the Create button at the top of the page and select Kubernetes from the dropdown menu.

3. The Create a Kubernetes Cluster page appears. At the top of the page, you need to select the following options:

  • In the Cluster Label field, provide a name for your cluster. 
  • the Region dropdown menu, select the Region where you would like your cluster to reside.
  • From the Version dropdown menu, select a Kubernetes version to deploy to your cluster.

4. In the Add Node Pool section, select the hardware resources for the Linode worker nodes that make up your LKE cluster. To the right of each plan, select plus + and minus – to add or remove a linode one at a time from a node pool.

5. Once a pool has been added to your configuration, it will appear in the cluster overview on the right side of Cloud Manager, with details on your cluster’s hardware resources and monthly costs. Additional pools can be added before the cluster creation process is completed by repeating the previous step for each additional pool.

6. When you are satisfied with the configuration of your cluster, click the Create Cluster button on the right hand side of the screen. Your cluster’s detail page will appear on the following page where you will see your Node Pools listed.

STEP 2: Connect to your LKE Cluster with kubectl

After you’ve created your LKE cluster using the Cloud Manager, you can begin interacting with and managing your cluster. You connect to it using the kubectl client on your computer. To configure kubectl, download your cluster’s kubeconfig file.

1. Access and Download your kubeconfig

Anytime after your cluster is created you can download its kubeconfig. The kubeconfig is a YAML file that will allow you to use kubectl to communicate with your cluster. Here is an example kubeconfig file:

apiVersion: v1

kind: Config

preferences: {}


clusters:

- cluster:

    certificate-authority-data: LS0tLS1CRUd...

    server: https://example.us-central.linodelke.net:443

  name: lke1234

users:

- name: lke1234-admin

  user:

    as-user-extra: {}

    token: LS0tLS1CRUd...

contexts:

- context:

    cluster: lke1234

    namespace: default

    user: lke1234-admin

  name: lke1234-ctx

current-context: lke1234-ctx

2. This configuration file defines your cluster, users, and contexts.

  • To access your cluster’s kubeconfig, log into your Cloud Manager account and navigate to the Kubernetes section.
  • From the Kubernetes listing page, click on your cluster’s more options ellipsis and select Download kubeconfig. The file will be saved to your computer’s Downloads folder.

3. To improve security, change the kubeconfig.yaml file permissions to be only accessible by the current user:

 chmod go-r /Downloads/kubeconfig.yaml

4. Open a terminal shell and save your kubeconfig file’s path to the $KUBECONFIG environment variable.

 export KUBECONFIG=~/Downloads/kubeconfig.yaml

5. View your cluster’s nodes using kubectl.

kubectl get nodes

kubectl get namespace 

So, yes we have done !

CONCLUSION

Here In this blog we have seen How To Create & Manage Kubernetes Cluster Using Linode. I hope you find this blog useful for you all . See you soon , till then keep learning.

REFERENCE

CLICK HERE .

Thankyou !!!

Happy Learning !!!

Written by 

Deeksha Tripathi is a Software Consultant at Knoldus Inc Software. She has a keen interest toward learning new technologies. Her practice area is DevOps. When not working, she will be busy in listening music , and spending time with her family .

Leave a Reply