All Projects → galexrt → K8s Vagrant Multi Node

galexrt / K8s Vagrant Multi Node

Licence: apache-2.0
A Kubernetes Vagrant Multi node environment using kubeadm.

Projects that are alternatives of or similar to K8s Vagrant Multi Node

fastdata-cluster
Fast Data Cluster (Apache Cassandra, Kafka, Spark, Flink, YARN and HDFS with Vagrant and VirtualBox)
Stars: ✭ 20 (-85.82%)
Mutual labels:  vagrant, cluster
kubernetes-basico
Demonstração dos componentes do Kubernetes
Stars: ✭ 26 (-81.56%)
Mutual labels:  vagrant, cluster
Docker Redis Cluster
Dockerfile for Redis Cluster (redis 3.0+)
Stars: ✭ 1,035 (+634.04%)
Mutual labels:  makefile, cluster
kubernetes the easy way
Automating Kubernetes the hard way with Vagrant and scripts
Stars: ✭ 22 (-84.4%)
Mutual labels:  vagrant, cluster
docker-swarm-vagrant
Getting started with Docker swarm
Stars: ✭ 20 (-85.82%)
Mutual labels:  vagrant, cluster
Kubernetes Vagrant Coreos Cluster
Kubernetes cluster (for testing purposes) made easy with Vagrant and CoreOS.
Stars: ✭ 598 (+324.11%)
Mutual labels:  cluster, vagrant
Docker Trino Cluster
Multiple node presto cluster on docker container
Stars: ✭ 81 (-42.55%)
Mutual labels:  makefile, cluster
Postgres Operator
Postgres operator creates and manages PostgreSQL clusters running in Kubernetes
Stars: ✭ 2,194 (+1456.03%)
Mutual labels:  cluster
Easyrss
Google Reader Client for Android
Stars: ✭ 137 (-2.84%)
Mutual labels:  makefile
Clusterhub
Sync data in your cluster applications.
Stars: ✭ 132 (-6.38%)
Mutual labels:  cluster
Vagrant Lamp Bootstrap
A super-simple Vagrantfile / bootstrap.sh to setup a LAMP stack inside Vagrant 100% automatically
Stars: ✭ 132 (-6.38%)
Mutual labels:  vagrant
Gpu monitor
Monitor your GPUs whether they are on a single computer or in a cluster
Stars: ✭ 133 (-5.67%)
Mutual labels:  cluster
Azos
A to Z Sky Operating System / Microservice Chassis Framework
Stars: ✭ 137 (-2.84%)
Mutual labels:  cluster
Ansible Role K3s
Ansible role for installing k3s as either a standalone server or HA cluster.
Stars: ✭ 132 (-6.38%)
Mutual labels:  cluster
Nuxt Generate Cluster
Multi-threaded generator command for nuxt.js
Stars: ✭ 140 (-0.71%)
Mutual labels:  cluster
Fluentd Catch All Config
Collection of configuration files for the Fluentd log collection agent. Intended to enable the automagic collection of most logs generated by many of the most popular applications run in the cloud.
Stars: ✭ 132 (-6.38%)
Mutual labels:  makefile
Kafka Monitor
Xinfra Monitor monitors the availability of Kafka clusters by producing synthetic workloads using end-to-end pipelines to obtain derived vital statistics - E2E latency, service produce/consume availability, offsets commit availability & latency, message loss rate and more.
Stars: ✭ 1,817 (+1188.65%)
Mutual labels:  cluster
Letsgo
Golang 小视频教程,零散时间学习 Golang
Stars: ✭ 139 (-1.42%)
Mutual labels:  makefile
Human Phenotype Ontology
Ontology for the description of human clinical features
Stars: ✭ 134 (-4.96%)
Mutual labels:  makefile
Multi Streaming Server
A NGINX server with RTMP module to send video streaming to multiple services simultaneously (Youtube, Twitch, Dailymotion, Hitbox, Beam, etc...).
Stars: ✭ 132 (-6.38%)
Mutual labels:  vagrant

k8s-vagrant-multi-node

Build Status

This project was based on work from coolsvap/kubeadm-vagrant by @coolsvap, now it is mostly independent.

A demo of the start and destroy of a cluster can be found here: README.md Demo section.

Prerequisites

  • make
  • kubectl - Optional when KUBECTL_AUTO_CONF is set to false (default: true).
  • grep
  • cut
  • rsync
  • Source for randomness (only used to generate a kubeadm token, when no custom KUBETOKEN is given):
    • /dev/urandom
    • openssl command - Fallback for when /dev/urandom is not available.
  • Vagrant (>= 2.2.0)
    • Tested with 2.2.2 (if you should experience issues, please upgrade to at least this Vagrant version or higher)
    • Plugins
      • vagrant-reload REQUIRED For BOX_OS=fedora (set by default) and when using the vagrant-reload* targets, the vagrant-reload plugin is needed. An automatic attempt to install the plugin is made. To install manually run one of the following commands:
        • make vagrant-plugins or
        • vagrant plugin install vagrant-reload
  • Vagrant Provider (one of the following two is needed)
    • libvirt (vagrant plugin install vagrant-libvirt)
      • Tested with libvirtd version 5.10.0.
      • Libvirt support is still a bit experimental and can be unstable (e.g., VMs not getting IPs).
        • Troubleshooting: If your VM creation is hanging at Waiting for domain to get an IP address..., using virsh run virsh force reset VM_NAME (VM_NAME can be obtained using virsh list command) or in virt-manager Force Reset on the VM.
    • Virtualbox (WARNING VirtualBox seems to hang the Makefile randomly for some people, libvirt is recommended)
      • Tested with 6.0.0 (if you should experience issues, please upgrade to at least this version or higher)
      • VBoxManage binary in PATH.

NOTE kubectl is only needed when the kubectl auto configuration is enabled (default is enabled), to disable it set the variable KUBECTL_AUTO_CONF to false. For more information, see the Configuration / Variables doc page.

Hardware Requirements

  • Master
    • CPU: 2 Cores (MASTER_CPUS)
    • Memory: 2GB (MASTER_MEMORY_SIZE_GB)
  • 1x Node:
    • CPU: 1 Core (it is recommended to use at least 2 Cores; NODE_CPUS)
    • Memory: 2GB (it is recommended to use more than 2GB; NODE_MEMORY_SIZE_GB)

These resources can be changed by setting the according variables for the make up command, see Configuration / Variables doc page.

Quickstart

To start with the defaults, 1x master and 2x workers, run the following:

$ make up -j 3

The -j3 will cause three VMs to be started in parallel to speed up the cluster creation.

NOTE Your kubectl is automatically configured to use a context for the created cluster, after the master VM is started. The context is named after the directory the Makefile is in.

$ kubectl config current-context
k8s-vagrant-multi-node
$ kubectl get componentstatus
NAME                 STATUS    MESSAGE              ERROR
scheduler            Healthy   ok
controller-manager   Healthy   ok
etcd-0               Healthy   {"health": "true"}
$ kubectl get nodes
NAME      STATUS    ROLES     AGE       VERSION
master    Ready     master    4m        v1.17.3
node1     Ready     <none>    4m        v1.17.3
node2     Ready     <none>    4m        v1.17.3

VM OS Selection

There are multiple sets of Vagrantfiles available (see vagrantfiles/) which can be used to use a different OS for the Kubernetes environment.

See VM OS Selection doc page.

Usage

Also see Usage doc page.

Starting the environment

To start up the Vagrant Kubernetes multi node environment with the default of two worker nodes + a master (not parallel) run:

$ make up

NOTE Your kubectl is automatically configured to use a context for the created cluster, after the master VM is started. The context is named after the directory the Makefile is in.

Faster (parallel) environment start

To start up 4 VMs in parallel run (-j flag does not control how many (worker) VMs are started, the NODE_COUNT variable is used for that):

$ NODE_COUNT=3 make up -j4

The flag -j CORES/THREADS allows yout to set how many VMs (Makefile targets) will be run at the same time. You can also use -j $(nproc) to start as many VMs as cores/threads you have in your machine. So to start up all VMs (master and three nodes) in parallel, you would add one to the chosen NODE_COUNT.

Show status of VMs

$ make status
master                    not created (virtualbox)
node1                     not created (virtualbox)
node2                     not created (virtualbox)

Shutting down the environment

To destroy the Vagrant environment run:

$ make clean
$ make clean-data

Copy local Docker image into VMs

The make load-image target can be used to copy a docker image from your local docker daemon to all the VMs in your cluster. The IMG variable can be expressed in a few ways, for example:

$ make load-image IMG=your_name/your_image_name:your_tag
$ make load-image IMG=your_name/your_image_name
$ make load-image IMG=my-private-registry.com/your_name/your_image_name:your_tag

You can also specify a new image name and tag to use after the image has been copied to the VM's by setting the TAG variable. This will not change the image/tag in your local docker daemon, it will only affect the image in the VM's.

$ make load-image IMG=repo/image:tag TAG=new_repo/new_image:new_tag

Data inside VM

See the data/VM_NAME/ directories, where VM_NAME is for example master.

make Targets

See make Targets doc page.

Configuration / Variables

See Configuration / Variables doc page.

Troubleshooting

See Troubleshooting doc page.

Demo

See Demo doc page.


Creating an Issue

Please attach the output of the make versions command to the issue as is shown in the issue template. This makes debugging easier.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].