Skip to content
This repository contains a bunch of deployments that forms a very sophisticated Kubernetes cluster with everything from Ingress controllers and DNS to monitoring, metrics and authentication.
Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ansible
services
.editorconfig
.gitattributes
LICENSE
README.md
ansible-inventory

README.md

Kubernetes deployments

This repository contains a bunch of deployments that forms a very sophisticated Kubernetes cluster with everything from ingress controllers and DNS to monitoring, metrics and authentication.

Purpose

Most resources on the Internet describes how to use various tools with a cloud environment. It's hard to find resources regarding bare metal installations and how to get started with a good cluster design. The purpose of this repository is to give a good view of how deployments of a good bare metal Kubernetes cluster can look like. It's important to remember that this is examples. Some parts can be used as it is, and some parts must be modified for your organization.

Important

There are many small but yet important things to consider when designing a good cluster state.

  • Be consistent with your labels. We'll be using labels to identify services in our metrics/logging service, so we'll have to keep a consistent naming convention of these.
  • Include a Logstash pipeline configuration for all new services. Include logging as a part of your development process. Skipping proper Logstash pipelines will cause havoc in your Kibana and it will be very hard to navigate the logs. Always write unit tests for these Logstash pipelines to make sure you never break them.
  • Be careful with your logging Elasticsearch data. Make sure you get the right types for them, because it can be tricky to change them.

Pre-requisites

This repository expects that you have a completely empty, vanilla, bare metal Kubernetes cluster. It works perfectly with Kubernetes The Right Way, which uses Ansible to initialize a vanilla bare metal cluster. This repository also utilizes Ansible to set up various tools on top of the cluster and it can even re-use the same Ansible inventory file, which makes them a perfect match.

Installing cluster

This example installs the cluster with Kubernetes The Right Way with additional tools (found under ansible/). Both uses Ansible and can share the same inventory file. See ansible-inventory for an example inventory file.

$ ansible-playbook --inventory ~/projects/kubernetes-deployments/ansible-inventory ~/projects/kubernetes-deployments/ansible/install.yaml
$ ansible-playbook --inventory ~/projects/kubernetes-deployments/ansible-inventory ~/projects/kubernetes-the-right-way/install.yml

The sample Ansible inventory file contains some things that you may want to tweak to your preferences:

  • cluster_name
  • Hostnames of all hosts
  • The network_interface variable of the nginx hosts. This is required by keepalived to properly watch the network interfaces.

License

This project is distributed under the MIT license.

You can’t perform that action at this time.