Code Monkey home page Code Monkey logo

k3s-linkerd's Introduction

Global K3s Deployment on Packet Baremetal

This repo contains Terraform scripts to deploy K3s and LinkerD on Packet baremetal servers spanning the globe. By default five seperate k3s clusters (1x Master and 1x Worker) will be deployed using Packet's t1.small.x86 & x1.small.x86 bare metal servers (only cheap as $0.07/hr). This also reserves a single global IPv4 address to be used as a BGP anycast endpoint so anyone connecting to that IP address will be directed to the closest cluster to them. We then add LinkerD to interconnect these clusters, as well as Packet's CCM and Autoscaler to allow these clusters to adapt to swell and contract to the load they are under.

Getting Started

You will need to first clone this repo, second ensure you have Terraform installed, third make sure you have LinkerD's cli installed, lastly you will need a Packet Account (Use promo code cody for $30 in free cloud credits.)

You will now need to create a terraform.tfvars file that looks something like this:

auth_token="FExVfiQafmhLu3HWHHwh3WZD5drjw45z"
organization_id="ecd6e867-e5fb-3e0b-b90e-090a055437ee"

You can also override any variable from the 00_vars.tf file by specifying that variable in the terraform.tfvars file.

Once all this is done. All you have to do now is run terraform init && terraform apply --auto-approve from the root of this git repo. And your clusters will be created and wired together!

About some of the tech...

LinkerD

LinkerD been chosen as a way to allow pods from each cluster to communicate with each other over an encrypted channel. Setting up LinkerD requires some pre-work such as generating certificates from a root ca and distributing them to each cluster. We've simplified this by generating a local CA based on OpenSSL.

Cluster Autoscaler

Packet has developed a Kubernetes Autoscaler that allows you to automatically add and subtract hardware whenever this is resource contention. This is installed automatically in this cluster and is regulated by the min_nodes & max_nodes variables for each cluster.

Cloud Control Manager (CCM)

Packet has developed their Kubernetes CCM which allows the cluster to know more information about the underlying nodes. This is a must have with the Cluster Autoscaler in so that when the Autoscaler removes a node, that node can bed deleted from Kubernetes gracefully.

BGP Anycast

Packet allows you to utilize BGP ECMP in order to load balance traffic to your servers. And with Packet Global IPs you can load balance traffic across the globe as well.

k3s-linkerd's People

Contributors

c0dyhi11 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

jmarhee asmtal

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.