<?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 Jeff Keith on Medium]]></title>
        <description><![CDATA[Stories by Jeff Keith on Medium]]></description>
        <link>https://medium.com/@jeffkeith01?source=rss-61d2cf9d1550------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*gxzKIXJSQ4POsNkV.jpg</url>
            <title>Stories by Jeff Keith on Medium</title>
            <link>https://medium.com/@jeffkeith01?source=rss-61d2cf9d1550------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 06:39:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jeffkeith01/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[Building a Kubernetes Cluster with Ansible Playbooks]]></title>
            <link>https://medium.com/@jeffkeith01/building-a-kubernetes-cluster-with-ansible-playbooks-b15619c93189?source=rss-61d2cf9d1550------2</link>
            <guid isPermaLink="false">https://medium.com/p/b15619c93189</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[ansible-playbook]]></category>
            <category><![CDATA[kubernetes-cluster]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[aws-kubernetes-cluster]]></category>
            <dc:creator><![CDATA[Jeff Keith]]></dc:creator>
            <pubDate>Fri, 20 May 2022 23:48:37 GMT</pubDate>
            <atom:updated>2022-05-20T23:48:37.534Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/595/1*f_qMTDpRaClkBNN5ey54nQ.jpeg" /></figure><p>It’s reasonably straightforward to build a Kubernetes cluster once you have all the requirements in an Ansible Playbook. With a few settings, it’s essentially “click and go”.</p><p>The playbooks are supplied here, but assume the following:</p><ol><li>You have two or more Linux (Ubuntu/Debian) computers (or VM’s) running to install Kubernetes that meet the requirements of Kubernetes. (Kubernetes will also run on Windows but that’s not covered in this document.) SSH port 22 needs to be enabled and reachable from where you run your ansible scripts.</li><li>Ansible is installed on each. <a href="https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#installing-ansible-on-ubuntu">See easy install here</a>. A new user must be added, <strong>ansadmin</strong>, that is part of the sudoers group.</li><li>If on an AWS instance, password authentication must be enabled. (edit /etc/ssh/sshd_config and change setting from no to yes)</li><li>SSH keys need to be generated and copied to the machines.</li></ol><p>At this point the scripts are ready to be executed, provided you supply some specifics about your environment.</p><p>These three scripts will install Kubernetes on a Control Plane and Workers. It suggests (and provides steps) to install Calico, and uses CRIO-Docker as a container engine.</p><p>One of the nice things about the scripts is that they are repeatable. If you’re like me you often tear down and start over.</p><p><a href="https://github.com/beakercoder/kubernetes-ansible-playbooks/blob/main/k8s-prereqs-dockerd-crio.yaml"><strong>The first script should be ran against all Worker and Control Plane nodes.</strong></a></p><p>It performs the following tasks:</p><ol><li>Opens ports needed by Kubernetes and Calico. (6443, 32750, 10250, 4443, 8080, 179)</li><li>Disables swap</li><li>Installs Docker and all needed packages</li><li>Installs Go</li><li>Install Containerd</li><li>Builds dockerd</li><li>Initializes and enabled cri-docker.sock</li></ol><p><a href="https://github.com/beakercoder/kubernetes-ansible-playbooks/blob/main/k8s-kubectl-kubelet-kubeadm.yaml"><strong>The second script should be ran against all Worker and Control Plane nodes.</strong></a></p><p>It performs the following tasks:</p><ol><li>Installs kubectl</li><li>Installs kubeadm</li><li>Install kubelet</li><li>sets installs to HOLD</li></ol><p><a href="https://github.com/beakercoder/kubernetes-ansible-playbooks/blob/main/k8s-createcluster.yaml"><strong>The third ( and last) script should be ran only against the Control Plane nodes.</strong></a></p><p>It performs the following tasks:</p><ol><li>sets up containerd</li><li>Initialized the cluster</li></ol><p>Once complete, run the following command on the Control Plane to get the join command for the worker nodes.</p><p>kubeadm token create — — print-join-command</p><p>You should now have a working Kubernetes cluster with repeatable Ansible scripts specific to your environment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b15619c93189" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>