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