Giter VIP home page Giter VIP logo

ansible-k8s's Introduction

ansible-k8s

Install a Kubernetes cluster (using Kubeadm) on Ubuntu Server using Ansible

This is a work-in-progress, but has been successfully tested on virtual machines running Ubuntu Server (x64) 20.04.2 LTS.

I am new to Ansible, so I am sure there is plenty of code that could be cleaned up or done differently. I welcome any and all pull requests if you have proposed changes.


WHAT THIS DOES:

  • Installs all prerequisite apt packages and does all prerequisite operating system configuration.
  • Uses the containerd CRI, which is installed from Docker's official repository.
    • The containerd configuration is modified to use 'systemd' as the c-group driver.
  • Uses the latest version of Kubernetes, which is installed from Google's official repository.
  • Initializes a Kubernetes cluster onto a single Master node using kubeadm.
    • The kubelet configuration is modified to use 'systemd' as the c-group driver.
    • The Network CNI being used is Calico.
    • Optionally, you can join more Master nodes to the cluster for high availability. This will use Kube-Vip to provide high availability.
  • Join one or more Worker nodes to the cluster.

ANSIBLE REQUIREMENTS:

  • Requires the posix collection, which can be installed with this command: ansible-galaxy collection install ansible.posix

THE TWO PLAYBOOKS:

  • playbook-k8s-master-single.yml
    • This is designed to build a Kubernetes cluster that contains 1 Master Node and N Worker Nodes.
    • This uses the default IP address of the Master Node as the cluster endpoint.
  • playbook-k8s-master-cluster.yml
    • This is designed to build a Kubernetes cluster that contains N Master Nodes and N Worker Nodes.
    • This installs Kube-Vip and therefore uses a Virtual IP (VIP) as the cluster endpoint.

TO DO:

  • Test this on Ubuntu Server (ARM) on Raspberry Pi and modify code as needed.

ansible-k8s's People

Contributors

nnellans avatar

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.