K3s HA running in AWS

Single server clusters can meet a variety of use cases, but for environments where uptime of the Kubernetes control plane is critical, you can run K3s in an HA configuration. An HA K3s cluster is comprised of:

  • Two or more server nodes that will serve the Kubernetes API and run other control plane services
  • An external datastore (as opposed to the embedded SQLite datastore used in single-server setups)


  • Create and config 3 Ec2 instances (Linux machine).
  • Experience in Kubernetes
  • Desire to learn about k3s

Server node

Run command

Get the server token running the command

Workers nodes

  • Create 2 new servers, those servers will be called workers .
  • Connect to worker-1

Create the env variables:

To install on worker nodes and add them to the cluster, run the installation script with the K3S_URL and K3S_TOKEN environment variables. Here is an example showing how to join a worker node:

Go to worker-2 and repeat the process.

Verify the nodes

Go to the server node and run:

You must see the node server and 2 workers working and running.

Create your local Kube config

Keep in the server node and run:

copy the result.

In your local machine, run

and paste the result got from the server node.

Done, you can interact with your cluster from the local machine. You are ready to apply for your first deployment in K3s. Good luck




Google Developer Expert & Sr Software Engineer & DevOps &. Soccer Fan

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Different types of Java Date and Time

Hello Front End — An Introduction To Web Development (Part 4 — Publish)

VFly: video editor&video maker

First step to build an efficient Agile programming team

Android fundamentals 09.1: Shared preferences

TrailHeist Solutions

How To Get Programming Project Ideas

Things Rust doesn’t let you do

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Gerardo Lopez Falcón

Gerardo Lopez Falcón

Google Developer Expert & Sr Software Engineer & DevOps &. Soccer Fan

More from Medium

How to monitor AWS EC2 PPS allowance limits

What Are Spot Instances And Why These Are Useful?

AWS Spot Instances

Terraform for DDLs is a bad idea

How to host a static website on AWS with S3, CloudFront, Route53 and Terraform — Interweave