Get kubernetes cluster ip
<p>I am using an external database that requires you to whitelist IPs for use, and I want a particular service in my k8s cluster to have access to this database.</p>

<p>I don't know which IP address to add to the whitelist. I tried whitelisting the <code>IP</code> field from <code>kubectl describe svc &lt;service_name&gt;</code>. That did not appear to work, so I then tried whitelisting the IP field from <code>kubectl describe pod &lt;pod_name&gt;</code>, which also didn't work. </p>

<p>Ideally I would be able to whitelist the IP from the service instead of the pod, as the pod IP is not static.</p>