DEV Community

Nivedita Prasad
Nivedita Prasad

Posted on

6 1

Steps for installing K3s on Ubuntu.

In the kubernetes world, there are so many distros available today - kubeadm, Minikube and many more.
But, what's K3s?

Let's begin!

What's K3s?

K3s is a fully CNCF(Cloud Native Computing Foundation) certified, compliant Kubernetes distribution by SUSE(formally Rancher Labs) that is easy to use and focused on lightness. Also, the deployment of applications with this lightweight kubernetes is faster. K3s has a built foundation on a single binary which is less than 100MB in size.

Advantage of K3s.

  • Small Size
  • Fast Deployment
  • Lightweight
  • Continuous Integration
  • Simplified and Secure
  • Perfect for IoT and Edge Computing.

If you want to learn more about K3s, just visit the K3s documentation.

Let's jump into the installation steps.

Step 1:

curl -sfL https://get.k3s.io | sh -
Enter fullscreen mode Exit fullscreen mode

After installation of k3s if you run kubectl get node, you will get an error for that reason step 2 is important.

Step 2:

To make kubectl work run these commands.

mkdir -p $HOME/.kube
sudo cp /etc/rancher/k3s/k3s.* $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
Enter fullscreen mode Exit fullscreen mode

Now, it's ready!
Go and check the node:)

It's pretty easy to install K3s, just in few seconds.

That's all, hope you have enjoyed it.
Happy Reading!

Do your career a big favor. Join DEV. (The website you're on right now)

It takes one minute, it's free, and is worth it for your career.

Get started

Community matters

Top comments (5)

Collapse
 
deepdhar profile image
Deep Dhar β€’

Very useful, nice explanation πŸ‘

Collapse
 
niveditacoder profile image
Nivedita Prasad β€’

Thanks!
Glad you like it :)

Collapse
 
bethansa profile image
Ethan Moeller β€’

Great explanation!

Collapse
 
niveditacoder profile image
Nivedita Prasad β€’

Glad you like it! :)

Collapse
 
amohammademami profile image
aMohammadEmami β€’

Thanks for the explanation
But it doesn't work for me
Image description

what seems to be the problem?

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs