Created
June 8, 2018 04:38
-
-
Save gmlp/3370b3fa3db4e3a80daffd1ed9712710 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
packer build terraform/packer-kubernetes.json | |
cd terraform | |
terraform init | |
aws ec2 create-key-pair --key-name k8s-key | jq -r '.KeyMaterial' > k8s-key.pem | |
terraform plan -target="aws_instance.kube-master" \ | |
-target="aws_eip_association.eip_assoc" -var k8s_key_name="k8s-key" -out=plan | |
ssh-keyscan $(terraform output master-ip) >> ~/.ssh/known_hosts | |
JOIN_COMMAND=$(ssh -i k8s-key.pem ubuntu@$(terraform output master-ip) "sudo kubeadm token create --print-join-command") | |
ssh -i k8s-key.pem ubuntu@$(terraform output master-ip) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment