GithubHelp home page GithubHelp logo

m9sweeper / kube-splat Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 70 KB

Ansible playbook for installing and configuring kubernetes system components

License: Apache License 2.0

Jinja 94.33% Shell 5.67%

kube-splat's Introduction


๐Ÿ“” Table of Contents

๐ŸŒŸ About the Project

kube-splat is responsible for installing infrastructure tools using ansible. It comes with an ansible role with a number of configurable tasks - just add your kubernetes cluster details and run a one-line command to install a suite of useful tools.

๐ŸŽฏ Features

kube-splat makes life very easy for organisations with:

  • Monitoring Solution
  • Logging Solution
  • Kubernetes Security Platform
  • Management and Issuance of TLS certificates
  • Metrics Server
  • Ingress-Nginx Controller
  • Descheduler

๐Ÿงฐ Toolbox

kube-splat makes it easy to orchestrate the implementation of a number of free security tools:

m9sweeper: Kubernetes Security Platform

kube-prometheus-stack: Monitoring Solution

loki-stack: Logging Solution

Cert Manager: Management and Issuance of TLS certificates

Metric Server: Metrics Server

Nginx Ingress: Ingress-Nginx Controller

Descheduler: Descheduler

โ€ผ๏ธ Prerequisites

This project requires a Kubernetes Cluster and uses ansible-playbook as package manager

If you don't have a Kubernetes Cluster running, you can install one locally with Minikube using the following directions

Installing Kubernetes Locally with Minikube

Mac Installation

Install on Mac from the terminal using curl

curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-darwin-amd64
sudo install minikube-darwin-amd64 /usr/local/bin/minikube
Windows Installation

Install on Windows using chocolatey

choco install minikube
choco install git

Once Minikube is installed, run the following command to start up a local cluster

minikube start --cni calico --kubernetes-version=v1.23.16

You can check that the cluster was successfully created and is running using kubectl get pods --all-namespaces to see if default pods were created. For more information, check out the official minikube docs.

โš™๏ธ Quick Installation

To install, first edit the following files to match the details of your Kubernetes cluster. If running a local Minikube cluster, the default values should suffice

Add/Modify common variables in all.yml

File path: group_vars/all.yml

Add/Modify cluster base variable in host_vars.

cat host_vars/minikube.yml
---
kube_context: minikube
k8s_cluster_name: minikube

Manage your cluster related details in inventories.

cat inventories/dev.yml
all:
  vars:
    kube_context: minikube
  hosts:
    localhost

Deploy on minikube

Once the details for your cluster have been filled in, just run the following command to set up everything

ansible-playbook deploy.yml -i inventories/dev.yml

Notes

Local Installation

When running against a local minikube cluster, some steps (m9sweeper, metrics-server, and nginx) may fail on a first time installation. This is expected, and they should run without issue after rerunning the playbook

Upgrading

kube-prometheus-stack

Many times upgrades will require updating the CRD's first. In the future it we plan to break CRD's into their own helm chart to alleviate this issue, but for now you will typically have to run commands such as these below (with the updated version number)

kubectl apply --server-side --force-conflicts -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.61.1/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml
kubectl apply --server-side --force-conflicts -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.61.1/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml
kubectl apply --server-side --force-conflicts -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.61.1/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml
kubectl apply --server-side --force-conflicts -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.61.1/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml
kubectl apply --server-side --force-conflicts -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.61.1/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml
kubectl apply --server-side --force-conflicts -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.61.1/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml
kubectl apply --server-side --force-conflicts -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.61.1/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml
kubectl apply --server-side --force-conflicts -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.61.1/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml

๐Ÿ‘‹ Contributing

The initial project was created by team members at Intelletive Consulting, but we hope others will contribute as well. Thanks goes to these wonderful people (emoji key):

Jacob Beasley
Jacob Beasley

๐Ÿ’ป ๐Ÿ“– ๐Ÿ”ฌ ๐Ÿ“† ๐Ÿš‡
jasonWoodman
jasonWoodman

๐Ÿ’ป ๐Ÿ“– ๐Ÿ”ฌ ๐Ÿ“† ๐Ÿš‡
charisprose
charisprose

๐Ÿ’ป โš ๏ธ
Grant Keiner
Grant Keiner

๐Ÿ’ป
Sahil Narang
Sahil Narang
๐Ÿ’ป ๐Ÿš‡

This project follows the all-contributors specification. Contributions of any kind welcome!

โš ๏ธ License

Distributed under the Apache License v2. See LICENSE.txt for more information.

๐Ÿค Contact

Project Link: https://github.com/m9sweeper/kube-splat

kube-splat's People

Contributors

jason-woodman avatar jasonwoodman avatar

Stargazers

Gazi Tarique Mahmud avatar

Watchers

Brandan Schmitz avatar  avatar

Forkers

sahilnarang1

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.