<p>Setup: Kubernetes cluster on AKS with nginx-kubernetes ingress. Azure Application Gateway routing domain with SSL certificate to nginx-kubernetes.</p>

<p>No problems serving everything in Kubernetes.</p>

<p>Now I moved static content to Azure Blob Storage. There's an option to use a custom domain, which works fine, but does not allow to use a custom SSL certificate. The only possible way is to set up a CDN and use the Verizon plan to use custom SSL certificates.</p>

<p>I'd prefer to keep all the routing in the ingress configuration, since some subroutes are directed to different Kubernetes services. Is there a way to mask and rewrite a path to the external blob storage url in nginx-kubernetes? Or is there any other available option that proxies an external url through ingress?</p>

<p>I don't mind having direct blob storage URLs for resources, but the main entry point should use the custom domain.</p>

<p>Not exactly the answer to the question, but the answer to the problem. Unfortunately this isn't documented very well. The solution is to create a service with a type of "ExternalName". According to <a href="https://akomljen.com/kubernetes-tips-part-1/" rel="noreferrer">https://akomljen.com/kubernetes-tips-part-1/</a> the service should look like this:</p>

<pre><code>kind: Service
apiVersion: v1
metadata:
  name: external-service
  namespace: default
spec:
  type: ExternalName
  externalName: full.qualified.domain.name
</code></pre>

<p>I just tried it and it works like a charm.</p>
