Giter VIP home page Giter VIP logo

k8s-cluster's Introduction

K8S Cluster Setup

This repository hosts a collection of tools, including Kubespray Inventory and various Ansible-based playbooks and roles, designed to setup of Kubernetes clusters on bare-metal or VPS servers.

Setting up the entire cluster with additional services takes up to 30 minutes.

The basic setup of the cluster relies on Kubespray and its tweaked inventory. Kubespray handles the installation of essential components like the Rancher Local-Path provisioner, Nginx ingress controller and Cert-manager. This configuration ensures that these components are smoothly integrated into the cluster setup, making it easier to manage and utilize Kubernetes.

Additional Services:

Python environment setup for Ansible:

VENVDIR=kubespray-venv
KUBESPRAYDIR=kubespray
python3  -m  venv  $VENVDIR
source  $VENVDIR/bin/activate
cd  $KUBESPRAYDIR
pip  install  -U  -r  requirements.txt

Kubespray playbooks:

Run in Kubespray directory:

Clean up old Kubernetes cluster with Ansible Playbook:

ansible-playbook -i inventory/mycluster/hosts.yaml --become --become-user=root reset.yml

Deploy cluster with Ansible Playbook

ansible-playbook -i inventory/mycluster/hosts.yaml --become --become-user=root cluster.yml

Project Directory Structure

  • kubespray: This directory contains Kubespray files with modified inventory file.
  • ansible: This directory constains custom Ansible roles and playbooks written to setup cluster infrastucture like Grafana etc.
  • tofu: This directory contains OpenTofu configuration files for provisioning infrastructure (GCP).
  • docs: This directory contains the documentation of the project.

k8s-cluster's People

Contributors

boredotter avatar

Watchers

 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.