We are now going to create a new security group for the worker nodes, as follows:
$ K8S_NODES_SG_ID=$(aws ec2 create-security-group \ --group-name k8s-nodes \ --description "Kubernetes Nodes" \ --vpc-id $VPC_ID \ --query GroupId \ --output text)
We will allow access to the worker nodes via the bastion host in order for us to log in for debugging purposes, as follows:
$ aws ec2 authorize-security-group-ingress \ --group-id $K8S_NODES_SG_ID \ --protocol tcp \ --port 22 \ --source-group $BASTION_SG_ID
We want to allow the kubelet and other processes running on the worker nodes to be able to connect to the API server on the master node. We do this using the following command:
$ aws ec2 authorize-security-group-ingress \ --group-id $K8S_MASTER_SG_ID \ --protocol tcp \ --port 6443 \ --source-group...