From fbbfba3a610023944ad33c01703ff5b6de2653e2 Mon Sep 17 00:00:00 2001 From: Moritz Graf Date: Sun, 16 Feb 2020 13:04:20 +0100 Subject: [PATCH] Vagrant with kubespray works. Lets move on --- README.md | 13 ++++++++++++- bootstrap/.gitignore | 1 + bootstrap/README.md | 21 +++++++++++++++++++++ bootstrap/config.rb | 2 ++ bootstrap/init_kubespray.sh | 5 +++++ 5 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 bootstrap/.gitignore create mode 100644 bootstrap/README.md create mode 100644 bootstrap/config.rb create mode 100755 bootstrap/init_kubespray.sh diff --git a/README.md b/README.md index 4a3cffe..830dc81 100644 --- a/README.md +++ b/README.md @@ -4,4 +4,15 @@ Infrapuzzle is the newly restructured way of implementing my private infrastruct * single node k8s "cluster" implemented with kubespray * development with Vagrant -* host directory storage \ No newline at end of file +* host directory storage +* Ingress via host network + +## Bootstrap + +Bootstrap is documented in the subfolders [REAMDE](./bootstrap/README.md) + +## Links used + +* [ingress via host network](https://kubernetes.github.io/ingress-nginx/deploy/baremetal/#via-the-host-network) +* [Install K8s with Kubespray](https://kubernetes.io/docs/setup/production-environment/tools/kubespray/) +* \ No newline at end of file diff --git a/bootstrap/.gitignore b/bootstrap/.gitignore new file mode 100644 index 0000000..94eba82 --- /dev/null +++ b/bootstrap/.gitignore @@ -0,0 +1 @@ +kubespray/** diff --git a/bootstrap/README.md b/bootstrap/README.md new file mode 100644 index 0000000..2e97c00 --- /dev/null +++ b/bootstrap/README.md @@ -0,0 +1,21 @@ +# Bootstrap + +The following lines document hwo to initalize a fresh cluster. On a real cluster, or using Vagrant. It therefore assumes to clone kubespray to this folder. It will be excluded in *.gitignore* and all files are in this folder. + +```sh +git clone https://github.com/kubernetes-sigs/kubespray.git +./init_kubespray.sh +cd kubespray +vagrant up +# up and abkle to ssh +vagrant ssh k8s-1 +``` + + +## Done steps + +The following steps have been done while first setup and are not required to be redone: + +```sh +cp ./kubespray/Vagrantfile . +``` diff --git a/bootstrap/config.rb b/bootstrap/config.rb new file mode 100644 index 0000000..d1e8e40 --- /dev/null +++ b/bootstrap/config.rb @@ -0,0 +1,2 @@ +$num_instances = 1 +$os = "centos" diff --git a/bootstrap/init_kubespray.sh b/bootstrap/init_kubespray.sh new file mode 100755 index 0000000..5bf6ef4 --- /dev/null +++ b/bootstrap/init_kubespray.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +# Idempotently initializes a fresh kubespray repo clone +mkdir -p kubespray/vagrant +cp config.rb kubespray/vagrant/config.rb \ No newline at end of file