Giter VIP home page Giter VIP logo

clustersetup's Introduction

clustersetup

Hobbyist bare metal kubernetes cluster setup using ansible. Used for serving some of our applications.

Requirements

Directory keys should contain a ssh key for accessing your nodes through ssh.

You'll also need a keys/known_hosts file populated by ssh-keyscan -t ed25519 <inventory-hostname-1> [... inventory-hostname-2 ... inventory-host-name-n] | tee keys/known_hosts

You also should have the vault-id password for encrypted values in the root directory of this repository.

For nodes, Ubuntu 20.04 LTS is used

Check out VM-setup.md for a detailed description and a preseed file.

Also check out Network.md for some hints regarding DNS.

Finally, we're using Flux v2 to install (almost) all components and applications. Check GitOps.md for a detailed description of our setup.

With local python & ansible installion

Install dependencies

ansible-galaxy install -r requirements.yaml

Only do this the very first time (for a new host add --limit "NAME-OF-NEW-HOST-FROM-INVENTORY")

ansible-playbook --tags initial-setup --ask-become-pass clustersetup.yaml

It is recommended to shut down (sudo shutdown -h now via ssh) your server to activate the qemu-guest-agent integration in Proxmox.

After starting your server again, do a full upgrade (sudo apt update && sudo apt upgrade -y).

Run playbooks

ansible-playbook clustersetup.yaml

Then, bootstrap your nodes

Attention: It is strongly advised to reboot your VMs before bootstrapping. Otherwise cgroup driver of docker and kubelet won't match. At least restart the docker service.

Attention #2: The bootstrap-nodes should be used only once for your cluster or after manually running kubeadm reset --force && rm -rf /etc/cni/net.d on all of the nodes.

ansible-playbook --tags bootstrap-nodes clustersetup.yaml

References

clustersetup's People

Contributors

ubergesundheit avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

jmorets21sec

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.