Skip to content

Commit

Permalink
fix the node labeling.
Browse files Browse the repository at this point in the history
  • Loading branch information
balchua committed May 3, 2020
1 parent 7afa110 commit 62786ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions microk8s-controller.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ resource "null_resource" "setup_tokens" {
provisioner "remote-exec" {
inline = [
"until /snap/bin/microk8s.status --wait-ready; do sleep 1; echo \"waiting for status..\"; done",
"/snap/bin/microk8s.kubectl label node ${digitalocean_droplet.microk8s-controller.name} node-role.kubernetes.io/master=master",
"/snap/bin/microk8s.add-node --token \"${var.cluster_token}\" --token-ttl ${var.cluster_token_ttl_seconds}",
"/snap/bin/microk8s.config > /client.config",
]
Expand Down
1 change: 1 addition & 0 deletions microk8s-worker.tf
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ resource "null_resource" "join_nodes" {
inline = [
"until /snap/bin/microk8s.status --wait-ready; do sleep 1; echo \"waiting for status..\"; done",
"/snap/bin/microk8s.join ${digitalocean_droplet.microk8s-controller.ipv4_address_private}:25000/${var.cluster_token}",
"until /snap/bin/microk8s.status --wait-ready; do sleep 1; echo \"waiting for status..\"; done",
"/snap/bin/microk8s.kubectl label node ${digitalocean_droplet.microk8s-controller.ipv4_address_private} node-role.kubernetes.io/worker=worker",
]
}
Expand Down

0 comments on commit 62786ac

Please sign in to comment.