Home K8S setup

This commit is contained in:
2021-03-13 00:23:06 +00:00
commit 8a5296a104
47 changed files with 3098 additions and 0 deletions
@@ -0,0 +1,14 @@
# kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
resource "null_resource" "metrics_server" {
provisioner "local-exec" {
when = create
command = "kubectl apply -f ./static/metrics-server.yaml"
}
provisioner "local-exec" {
when = destroy
command = "kubectl delete -f ./static/metrics-server.yaml"
}
}
@@ -0,0 +1,14 @@
# kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
resource "null_resource" "flannel_networking" {
provisioner "local-exec" {
when = create
command = "kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml"
}
provisioner "local-exec" {
when = destroy
command = "kubectl delete -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml"
}
}
@@ -0,0 +1,12 @@
resource "null_resource" "metallb_networking" {
provisioner "local-exec" {
when = create
command = "kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/main/manifests/metallb.yaml; kubectl get configmap kube-proxy -n kube-system -o yaml | sed -e \"s/strictARP: false/strictARP: true/\" | kubectl apply -f - -n kube-system"
}
provisioner "local-exec" {
when = destroy
command = "kubectl delete -f https://raw.githubusercontent.com/metallb/metallb/main/manifests/metallb.yaml"
}
}