Skip to content

Latest commit

 

History

History
49 lines (34 loc) · 1.95 KB

File metadata and controls

49 lines (34 loc) · 1.95 KB

HOWTO Setup Kubernetes Using Ansible and Vagrant

This tutorial originates from kubernetes.io/blog (March 15, 2019). It has been updated and validated against Windows 10 / WSL2 / Ubuntu 20.04 on December 2021.

Requirements

  • Linux (can run with WSL)
  • VirtualBox
  • Vagrant (see GitHub Issue#291 to make it work in WSL)
  • Ansible

Design

Configuration

Steps

cd samples/k8s-ansible-vagrant

# provisions and configure the machines
vagrant up

# connects to k8s control plane
vagrant ssh k8s-controleplane

# on the machine, look at nodes state (should be Ready)
$ kubectl get nodes

# connects to k8s first node
vagrant ssh node-1

# (optional) troubleshoots
vagrant up --provision k8s-controleplane

# cleans-up
vagrant destroy