<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Erik Aulin on Medium]]></title>
        <description><![CDATA[Stories by Erik Aulin on Medium]]></description>
        <link>https://medium.com/@aulin?source=rss-4e35cbc2bea0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*efgNM-AArxwmVuVz.png</url>
            <title>Stories by Erik Aulin on Medium</title>
            <link>https://medium.com/@aulin?source=rss-4e35cbc2bea0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 07:35:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@aulin/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Letsencrypt TLS certificates on AKS (Azure Kubernetes Service) cluster using traefik with…]]></title>
            <link>https://medium.com/@aulin/letsencrypt-tls-certificates-on-aks-azure-kubernetes-service-cluster-using-traefik-with-e9bcc7a9355a?source=rss-4e35cbc2bea0------2</link>
            <guid isPermaLink="false">https://medium.com/p/e9bcc7a9355a</guid>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[cloudflare]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[lets-encrypt]]></category>
            <category><![CDATA[traefik]]></category>
            <dc:creator><![CDATA[Erik Aulin]]></dc:creator>
            <pubDate>Thu, 24 May 2018 19:15:11 GMT</pubDate>
            <atom:updated>2018-05-25T21:19:31.254Z</atom:updated>
            <content:encoded><![CDATA[<h3>Letsencrypt TLS certificates on AKS (Azure Kubernetes Service) cluster using traefik with Cloudflare DNS-01 challenge provider.</h3><p>Just finished a post about <a href="https://medium.com/@aulin/letsencrypt-tls-certificates-on-aks-azure-kubernetes-service-cluster-using-cert-manager-and-6ee445e7ff9">cert-manager</a> but also seen that information on traefik using helm was sparse and not all steps where obvious. I will not dive into all the steps to go from A-Z. There are plenty of guides on how to create AKS clusters and setup your DNS using cloudflare. This post is just to guide you with the DNS-01 challenge.</p><blockquote>Prerequisite:<br>- Create a AKS cluster on Azure.<br>- Create a Cloudflare account and register your domain. <br>- Create a *.labs record that will later point the nginx-ingress controller.<br>- Get your Cloudflare Global API Key.</blockquote><p>I’m using a values.yaml file to extend the default helm chart installation. Helm will create a secret called <a href="https://medium.com/resources/Secret/traefik-proxy-dnsprovider-config"><em>traefik-proxy-dnsprovider-config</em></a> where it stores the value <em>CLOUDFLARE_API_KEY</em> and <em>CLOUDFLARE_EMAL so you can use the clear text email and api key.</em></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8053ab9d38b7790b21f70161ca7cb7b6/href">https://medium.com/media/8053ab9d38b7790b21f70161ca7cb7b6/href</a></iframe><p>Let’s install the traefik helm, we can use kubectl to grab the external IP. In this example I’m using the -w flag so it waits and as soon as the external IP is ready it updates.</p><pre>$ helm install \<br>  --values values.yaml \<br>  --name traefik-proxy \<br>  --namespace kube-system \<br>  stable/traefik</pre><pre>$ kubectl get svc traefik-proxy --namespace kube-system -w</pre><p>It should look something like this after a few minutes.</p><pre>NAME TYPE CLUSTER-IP EXTERNAL-IP<br>traefik-proxy LoadBalancer 10.0.44.69 127.127.184.59</pre><p>Add a new DNS record on cloudflare to point *.labs to the EXTERNAL-IP.</p><p>I’m using <a href="https://github.com/kubernetes-up-and-running/kuard">kuard</a> as this app also lets you see some nice information for troubleshooting.</p><pre>$ kubectl apply -f deployment.yaml</pre><p>Now its time to create a ingress for traefik. You might need to wait a little for traefik to get the tls.crt and tls.key from letsencrypt.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9c94d8283749bd0db529e08716968084/href">https://medium.com/media/9c94d8283749bd0db529e08716968084/href</a></iframe><p>That’s it!</p><p>Cheers //Erik</p><p><em>Originally published at </em><a href="https://medium.com/@aulin/letsencrypt-tls-certificates-on-aks-azure-kubernetes-service-cluster-using-cert-manager-and-6ee445e7ff9"><em>medium.com</em></a><em> on May 24, 2018.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e9bcc7a9355a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Letsencrypt TLS certificates on AKS (Azure Kubernetes Service) cluster using cert-manager and…]]></title>
            <link>https://medium.com/@aulin/letsencrypt-tls-certificates-on-aks-azure-kubernetes-service-cluster-using-cert-manager-and-6ee445e7ff9?source=rss-4e35cbc2bea0------2</link>
            <guid isPermaLink="false">https://medium.com/p/6ee445e7ff9</guid>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[cloudflare]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[lets-encrypt]]></category>
            <category><![CDATA[nginx]]></category>
            <dc:creator><![CDATA[Erik Aulin]]></dc:creator>
            <pubDate>Thu, 24 May 2018 19:15:11 GMT</pubDate>
            <atom:updated>2018-05-24T20:57:44.393Z</atom:updated>
            <content:encoded><![CDATA[<h3>Letsencrypt TLS certificates on AKS (Azure Kubernetes Service) cluster using cert-manager and nginx-ingress controller with Cloudflare <em>DNS-01 challenge provider.</em></h3><p>Writing this post as I seen that most information on this topic was sparse and not all steps where obvious, like creating secrets and how that is connected with the ingressShim. I will not dive into all the steps to go from A-Z. There are plenty of guides on how to create AKS clusters and setup your DNS using cloudflare. This post is just to guide you with the DNS-01 challenge. If you never used cert-manager before I can recommend starting with a excellent post from <a href="https://medium.com/@maninder.bindra">maninder.bindra</a> on <a href="https://medium.com/@maninder.bindra/auto-provisioning-of-letsencrypt-tls-certificates-for-kubernetes-services-deployed-to-an-aks-52fd437b06b0">how to use AKS with http01 challange provider</a>.</p><blockquote>Prerequisite:<br>- Create a AKS cluster on Azure.<br>- Create a Cloudflare account and register your domain. <br>- Create a *.labs record that will later point the nginx-ingress controller.<br>- Get your Cloudflare Global API Key.</blockquote><h3>Install nginx-ingress controller and cert-manager.</h3><p>The first thing to install is the nginx-ingress controller and let’s install it using helm. Since AKS does not support RBAC we need to use some false flags. Second thing to install is the cert-manager. It’s also here you add some values for ingressShim to work, like pointing to a default issuer name and kind so it auto creates certificates and stores them as secrets.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/76dcd012d099e860ccdb52e53a63a268/href">https://medium.com/media/76dcd012d099e860ccdb52e53a63a268/href</a></iframe><h3>Optain the nginx-ingress-controller external IP</h3><p>Kubectl can be used to grab the external IP. In this example I’m using the -w flag so it waits and as soon as the external IP is ready it updates.</p><pre>$ kubectl --namespace default get services -o wide -w nginx-ingress-controller</pre><p>It should look something like this after a few minutes.</p><pre>NAME                     TYPE         CLUSTER-IP  EXTERNAL-IP<br>nginx-ingress-controller LoadBalancer 10.0.44.69  127.127.184.59</pre><p>Add a new DNS record on cloudflare to point *.labs to the EXTERNAL-IP.</p><h3>Create a deployment and service for which we can later enable TLS</h3><p>I’m using <a href="https://github.com/kubernetes-up-and-running/kuard">kuard</a> as this app also lets you see some nice information for troubleshooting.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2345f0d19276505e906f3896db133cf7/href">https://medium.com/media/2345f0d19276505e906f3896db133cf7/href</a></iframe><pre>$ kubectl apply -f deployment.yaml</pre><h3>Create a secret that will be used by ClusterIssuer.</h3><p>First we need to base64 encode the Cloudflare Global API Key.<br>You can use a simple command like this one.</p><pre>$ echo -n ‘000000000000000000000000000’ | openssl base64</pre><blockquote>Output example of a base64 encoded Global API Key: MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAw</blockquote><p>It’s important to place the secret in the same namespace as cluster-manager.<br>In my case I’m using kube-system.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a3c1de32569849c0d9d4e3e25bdf68b0/href">https://medium.com/media/a3c1de32569849c0d9d4e3e25bdf68b0/href</a></iframe><pre>$ kubectl apply -f api-secret.yaml</pre><h3>Create CloudIssuer</h3><p>Cert-manager need a issuer to create certificates. We deployed using some predefined values that included default-issuer-name set to <em>letsencrypt-prod</em> and the default-issuer-kind set to <em>ClusterIssuer</em>. You can also see that the apiKeySecretRef is pointing to the secret we just created.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/49ce4f360f40743500d246cad2a80b66/href">https://medium.com/media/49ce4f360f40743500d246cad2a80b66/href</a></iframe><pre>$ kubectl apply -f cluster-issuer-prod.yaml</pre><h3>Create ingress for kuard</h3><p>Now you are ready to create a ingress for your kuard app. Most guides skip the certmanager annotations but I have not seen it work without them when using dns01 challange type.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/138b868e4338a45726801c8b7f400cda/href">https://medium.com/media/138b868e4338a45726801c8b7f400cda/href</a></iframe><h3>Done?</h3><p>This is what I have done to get my ingress to work. You might need to wait a little for cert-manager to get the tls.crt and tls.key from letsencrypt. You can check if it’s ready with the following kubectl command.</p><pre>$ kubectl describe secret kuard-labs-example-tls<br>Name:         kuard-labs-example-tls<br>Namespace:    default<br>Labels:       &lt;none&gt;<br>Annotations:  &lt;none&gt;</pre><pre>Type:  kubernetes.io/tls</pre><pre>Data<br>====<br>tls.crt:  3806 bytes<br>tls.key:  1675 bytes</pre><p>I’m not going to deep dive into troubleshooting as there are plenty of guides on how to check logs from cert-manager.</p><p>Cheers //Erik</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ee445e7ff9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>