bootkube-terraform is a Terraform module that renders bootkube assets, just like running the binary bootkube render. It aims to provide the same variable names, defaults, features, and outputs.
Use the bootkube-terraform module within your existing Terraform configs. Provide the variables listed in variables.tf or check terraform.tfvars.example for examples.
module "bootkube" {
source = "git://https://github.com/dghubble/bootkube-terraform.git"
cluster_name = "example"
api_servers = ["node1.example.com"]
etcd_servers = ["http://127.0.0.1:2379"]
asset_dir = "/home/core/clusters/mycluster"
experimental_self_hosted_etcd = false
}Alternately, use a local checkout of this repo and copy terraform.tfvars.example to terraform.tfvars to generate assets without an existing terraform config repo.
Generate the bootkube assets.
terraform get
terraform plan
terraform applyRender bootkube assets directly with bootkube v0.4.2.
bootkube render --asset-dir=assets --api-servers=https://node1.example.com:443 --api-server-alt-names=DNS=node1.example.com --etcd-servers=http://127.0.0.1:2379Compare assets. The only diffs you should see are TLS credentials.
diff -rw assets /home/core/cluster/myclusterbootkube render --asset-dir=assets --api-servers=https://node1.example.com:443 --api-server-alt-names=DNS=node1.example.com --experimental-self-hosted-etcdCompare assets. Note that experimental must be generated to a separate directory for terraform applies to sync. Move the experimental bootstrap-manifests and manifests files during deployment.
diff -rw assets /home/core/cluster/mycluster