title: How do you deploy Identity Server on Kubernetes?
body: <p>I want to deploy Identity Server 4 on Kubernetes 1.8, and use this as a Federation Gateway between my web application and Azure Active Directory (to begin with). </p>
  
  <p>If I call Identity Server from my web application using the local k8s service name, my users are redirected to the wrong Identity Server URL (containing the local k8s service name) during Sign in which clearly won't work. We are using an implicit flow.</p>
  
  <p>I therefore setup a Azure Load balancer with dns name and configured Identity Server to be externally accessible with the domain name as the PublicOrigin URL.</p>
  
  <p>However, my web application <strong>which runs in the same cluster</strong> cannot access Identity Server using the external URL of the Identity Server (discovery fails). </p>
  
  <p>If I run Identity Server on another Kubernetes cluster then everything works fine.</p>
  
  <p><strong>My question is:</strong></p>
  
  <p>How do you properly deploy Identity Server in Kubernetes? Do I really need another Kubernetes cluster?</p>
  
  <p>Note: I am using Kubernetes on Azure created with ACS engine (because we have mixed windows and linux containers). </p>