Skip to content
Snippets Groups Projects
Commit 13cf44f8 authored by Rafael László's avatar Rafael László :speech_balloon:
Browse files

add docs and third worker

parent af068ef5
No related branches found
No related tags found
No related merge requests found
commands on management host:
# Maze configs and automation
## K8s cluster
In my case there is a VPN connection to the `192.168.96.0/22` network.
1. Terraform
Setup env variables (`PM_USER`, `PM_PASS`)
```
cd terraform
terraform init
terraform apply
```
2. Ansible
```
cd ansible
./bootstrap.sh
ansible-playbook install.yml
```
3. KubeSpray
ssh into the mgmt vm
```
cd /root/kubespray
ansible-playbook -i inventory/prod/inventory.ini cluster.yml -e download_run_once=True -e download_localhost=True --become
```
(prod `inventory` is copied from `ansible/files/...`)
helm install nfs-subdir-external-provisioner nfs-subdir-external-provisioner/nfs-subdir-external-provisioner --set nfs.server=192.168.96.102 --set nfs.path=/home/public
4. Setup NFS Storageclass
```
helm repo add nfs-subdir-external-provisioner https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner/
helm install nfs-subdir-external-provisioner \
nfs-subdir-external-provisioner/nfs-subdir-external-provisioner \
--set nfs.server=192.168.96.102 --set nfs.path=/home/public \
--namespace nfs-provisioner --create-namespace
```
default storageclass name: `nfs-client`
\ No newline at end of file
......@@ -7,7 +7,7 @@ master-01 ansible_host=192.168.96.111 ansible_user=ubuntu
; master-03 ansible_host=192.168.96.113 ansible_user=ubuntu
worker-01 ansible_host=192.168.96.121 ansible_user=ubuntu
worker-02 ansible_host=192.168.96.122 ansible_user=ubuntu
; worker-03 ansible_host=192.168.96.123 ansible_user=ubuntu
worker-03 ansible_host=192.168.96.123 ansible_user=ubuntu
# node5 ansible_host=95.54.0.16 # ip=10.3.0.5 etcd_member_name=etcd5
# node6 ansible_host=95.54.0.17 # ip=10.3.0.6 etcd_member_name=etcd6
......@@ -28,7 +28,7 @@ master-01
[kube_node]
worker-01
worker-02
; worker-03
worker-03
[calico_rr]
......
......@@ -20,8 +20,8 @@ all:
ansible_user: ubuntu
192.168.96.122:
ansible_user: ubuntu
# 192.168.96.123:
# ansible_user: ubuntu
192.168.96.123:
ansible_user: ubuntu
nfs:
hosts:
......
# Management stuff
## Setup KubeSpray
```
ansible-playbook -i inventory/prod/inventory.ini cluster.yml -e download_run_once=True -e download_localhost=True --become
```
## Setup NFS Subdir External Provisioner
```
helm repo add nfs-subdir-external-provisioner https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner/
helm install nfs-subdir-external-provisioner \
nfs-subdir-external-provisioner/nfs-subdir-external-provisioner \
--set nfs.server=192.168.96.102 --set nfs.path=/home/public \
--namespace nfs-provisioner --create-namespace
```
......@@ -77,12 +77,12 @@ variable "vms" {
cores = 4,
memory = 8192
},
# k8s-worker-03 = {
# vmid = 123,
# storage_size = "16G",
# cores = 4,
# memory = 8192
# },
k8s-worker-03 = {
vmid = 123,
storage_size = "16G",
cores = 4,
memory = 8192
},
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment