add flatcar to hetzner
This commit is contained in:
parent
ab03825875
commit
f406e30191
3 changed files with 12 additions and 9 deletions
|
@ -59,8 +59,8 @@ Edit `default.tfvars` to match your requirement.
|
|||
Run Terraform to create the infrastructure.
|
||||
|
||||
```bash
|
||||
terraform -chdir=../../contrib/terraform/hetzner init
|
||||
terraform -chdir=../../contrib/terraform/hetzner/ apply --var-file=default.tfvars
|
||||
terraform -chdir=./kubespray/contrib/terraform/hetzner/ init
|
||||
terraform -chdir=./kubespray/contrib/terraform/hetzner/ apply --var-file=./kubespray/inventory/my-hetzner-cluster/default.tfvars
|
||||
```
|
||||
|
||||
You should now have a inventory file named `inventory.ini` that you can use with kubespray.
|
||||
|
@ -75,7 +75,7 @@ ansible -i inventory.ini -m ping all
|
|||
You can setup Kubernetes with kubespray using the generated inventory:
|
||||
|
||||
```bash
|
||||
ansible-playbook -i inventory.ini ../../cluster.yml -b -v
|
||||
ansible-playbook -i inventory.ini ./kubespray/cluster.yml -b -v
|
||||
```
|
||||
|
||||
## Cloud controller
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
provider "hcloud" {}
|
||||
|
||||
module "kubernetes" {
|
||||
source = "./modules/kubernetes-cluster-flatcar"
|
||||
source = "./modules/kubernetes-cluster"
|
||||
#source = "./modules/kubernetes-cluster-flatcar"
|
||||
|
||||
prefix = var.prefix
|
||||
|
||||
|
@ -9,7 +10,9 @@ module "kubernetes" {
|
|||
|
||||
machines = var.machines
|
||||
|
||||
ssh_private_key_path = var.ssh_private_key_path
|
||||
#only for flatcar
|
||||
#ssh_private_key_path = var.ssh_private_key_path
|
||||
|
||||
ssh_public_keys = var.ssh_public_keys
|
||||
network_zone = var.network_zone
|
||||
|
||||
|
|
|
@ -7,9 +7,9 @@ terraform {
|
|||
null = {
|
||||
source = "hashicorp/null"
|
||||
}
|
||||
#template = {
|
||||
# source = "hashicorp/template"
|
||||
#}
|
||||
template = {
|
||||
source = "hashicorp/template"
|
||||
}
|
||||
}
|
||||
required_version = ">= 0.14"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue