Giter Site home page Giter Site logo

k3s-lab's Introduction

Raspberry Pi Kubernetes Cluster

Configures a Raspberry Pi Kubernetes (K3S) cluster using Ansible.

Prerequisites

  • A Linux host to use as an Ansible server, separate to the cluster
    • This example uses Ubuntu - this is important because installing Ansible differs by distro
    • Tested using Ubuntu 18.04 on WSL
  • Basic configuration of the RPi boards
    • Flash Raspbian Lite
    • Add ssh to the root
    • Add a configured wpa_supplicant.conf to the root
    • Set a static IP for each node

Installation

All tasks are to be performed on the Ansible server host.

  1. Download the repository:

    git clone https://github.com/devopsleigh/k3s-lab.git
    cd k3s-lab
  2. Edit the Ansible inventory:

    nano hosts.ini
     [master]
     k3s-master ansible_host=10.0.0.10
    
     [node]
     k3s-node1 ansible_host=10.0.0.11
     k3s-node2 ansible_host=10.0.0.12
     k3s-node3 ansible_host=10.0.0.13
    
     [cluster:children]
     master
     node
    
     [cluster:vars]
     ansible_user=ansible
  3. Set up SSH keys and get the timezone:

    sudo bash config.sh
  4. Create the 'ansible' user and set some basic config:

    ansible-playbook baseline.yml -e 'ansible_user=pi' --extra-vars "TZ=$timezone"
  5. Configure K3S

    ansible-playbook kubernetes.yml

Uninstall K3S

ansible cluster -a "/usr/local/bin/k3s-uninstall.sh" -b

k3s-lab's People

Contributors

devopsleigh avatar

k3s-lab's Issues

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.