Now we can launch an instance for Kubernetes control plane components. First, we will create a security group for this new instance, as follows:
$ K8S_MASTER_SG_ID=$(aws ec2 create-security-group \ --group-name k8s-master \ --description "Kubernetes Master Hosts" \ --vpc-id $VPC_ID \ --query GroupId \ --output text)
We will need to be able to access this instance from our bastion host in order to log in and configure the cluster. We will add a rule to allow SSH traffic on port 22 from instances in the ssh-bastion security group, as follows:
$ aws ec2 authorize-security-group-ingress \ --group-id $K8S_MASTER_SG_ID \ --protocol tcp \ --port 22 \ --source-group $BASTION_SG_ID
Now we can launch the instance, as follows:
$ K8S_MASTER_INSTANCE_ID=$(aws ec2 run-instances \ --private-ip-address 10.0.0.10 \ ...