Skip to content

Deploying a mutli-nodes kubernetes cluster with Vagrantfile and Ansible

Notifications You must be signed in to change notification settings

waewoo/k8s-cluster-vagrant-ansible

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

k8s-cluster-vagrant-ansible

Description

This project allows you to deploy a multi-node kubernetes cluster with the help of Vagrantfile and Ansible

How to

Deploy and run the nodes

vagrant up

Configure the k8s cluster

You can configure your k8s cluster by editing the CONFIGURATION VARIABLES available in the Vagrantfile

Configure your kubectl

Here's how to configure the kubectl tool on your local machine to communicate with the kubernetes API :

scp -r vagrant@192.168.50.10:/home/vagrant/.kube $HOME/
password = vagrant

Test your config like the example bellow :

kubectl get nodes

Result :

NAME       STATUS   ROLES    AGE   VERSION
master     Ready    master   35m   v1.15.1
worker-1   Ready    <none>   30m   v1.15.1

Connect to the master via ssh

Either you are at the same level as your Vagrantfile, in this case you run the following command :

vagrant ssh master

Either you are in another folder :

ssh -r vagrant@192.168.50.10
password = vagrant

About

Deploying a mutli-nodes kubernetes cluster with Vagrantfile and Ansible

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published