title: Rancher static IP for containers
body: <p>I am trying to configure a few containers to use a static IP address added to the host.</p>
  
  <p>I have the server configured with main IP <code>1.1.1.1</code> and added a virtual interface (eth0:0) with IP address <code>2.2.2.2</code> (<code>1.1.1.1</code> and <code>2.2.2.2</code> are just example IP addresses, to avoid leaving the real ones here).</p>
  
  <p>I have been able to configure 2 containers to use that IP address, using hostports <code>2.2.2.2:8080</code> and <code>2.2.2.2:2222</code>.</p>
  
  <p>I am now trying to add a third container, with hostport <code>2.2.2.2:80</code></p>
  
  <p>When I try to do that, I receive the following error:</p>
  
  <p><code>0/1 nodes are available: 1 node(s) didn't have free ports for the requested pod ports.</code></p>
  
  <p>What configuration am I missing here? Rancher web interface is replying in <code>1.1.1.1</code> and <code>2.2.2.2</code>, but I would like it to only use <code>1.1.1.1</code>, leaving the other IP addresses and ports for containers.</p>
  
  <p>These are the commands I used to fire up rancher, and I am not sure if I should change the <code>80</code> or <code>443</code> part (on the left or the right) to match the correct public IP I want to map to rancher:</p>
  
  <pre><code>docker run -d --restart=unless-stopped -p 80:80 -p 443:443 rancher/rancher
  sudo docker run -d --privileged --restart=unless-stopped --net=host -v /etc/kubernetes:/etc/kubernetes -v /var/run:/var/run rancher/rancher-agent:v2.1.7 --server https://[MY_HOST] --token [token] --ca-checksum [ca-chaecksum] --etcd --controlplane --worker
  </code></pre>