title: Connection refused on KOPS deployed master node in kubernetes cluster hosted on AWS
body: <p>I'm doing a little R&amp;D on Kubernetes and deploying clusters on AWS. I'm using KOPS to do the heavy lifting and provisioning the cluster with Terraform.</p>
  
  <p>My goal is testing the behavior of Kubernetes when a port that is essential to a particular service has been blocked on a node hosting pods provide the service. To do so, I wanted to ssh into my master node and manually block the port on a worker.</p>
  
  <p>I've been running the following command : </p>
  
  <pre><code>ssh -i ~/.ssh/id_rsa admin@&lt;master_ip&gt;
  </code></pre>
  
  <p>only to have the following response</p>
  
  <pre><code>ssh: connect to host &lt;master_ip&gt; port 22: Connection refused
  </code></pre>
  
  <p>This is the command that I've been using to create my cluster :</p>
  
  <pre><code>kops create cluster \
  --name=${KOPS_NAME} \
  --state=${KOPS_STATE_STORE} \
  --zones=eu-central-1a,eu-central-1b,eu-central-1c \
  --master-zones=eu-central-1a,eu-central-1b,eu-central-1c  \
  --node-count=5 \
  --node-size=t2.micro \
  --master-size=t2.micro \ 
  --ssh-public-key=~/.ssh/id_rsa.pub \
  --out=. \
  --target=terraform
  </code></pre>
  
  <p>The security groups on AWS, in which my masters are enrolled, allow traffic on the port 22 and running a </p>
  
  <pre><code>kops describe secret admin
  </code></pre>
  
  <p>shows that there is a public key attributed to the admin user. </p>
  
  <p>I do not think this is a bug, as there is no one else that seems to have this problem on the KOPS git, and, while I am far from an expert in AWS, it would seem odd to me that this is a problem with AWS.</p>
  
  <p><strong>EDIT</strong></p>
  
  <pre><code>$&gt; ssh -i ~/.ssh/id_rsa &lt;adress&gt;.elb.amazon.com -vvv
  OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017
  debug1: Reading configuration data /etc/ssh/ssh_config
  debug1: /etc/ssh/ssh_config line 58: Applying options for *
  debug2: resolving "&lt;address&gt;.elb.amazonaws.com" port 22
  debug2: ssh_connect_direct: needpriv 0
  debug1: Connecting to &lt;address&gt;.elb.amazonaws.com [ip address] port 22.
  </code></pre>