{"id":5940,"date":"2019-03-15T17:00:02","date_gmt":"2019-03-15T17:00:02","guid":{"rendered":"http:\/\/howk.de\/w1\/blog-kubernetes-setup-using-ansible-and-vagrant\/"},"modified":"2019-03-15T17:00:02","modified_gmt":"2019-03-15T17:00:02","slug":"blog-kubernetes-setup-using-ansible-and-vagrant","status":"publish","type":"post","link":"https:\/\/howk.de\/?p=5940","title":{"rendered":"Blog: Kubernetes Setup Using Ansible and Vagrant"},"content":{"rendered":"<p><strong>Author:<\/strong> Naresh L J (Infosys)<\/p>\n<h2 id=\"objective\">Objective<\/h2>\n<p>This blog post describes the steps required to setup a multi node Kubernetes cluster for development purposes. This setup provides a production-like cluster that can be setup on your local machine.<\/p>\n<h2 id=\"why-do-we-require-multi-node-cluster-setup\">Why do we require multi node cluster setup?<\/h2>\n<p>Multi node Kubernetes clusters offer a production-like environment which has various advantages. Even though Minikube provides an excellent platform for getting started, it doesn&rsquo;t provide the opportunity to work with multi node clusters which can help solve problems or bugs that are related to application design and architecture. For instance, Ops can reproduce an issue in a multi node cluster environment, Testers can deploy multiple versions of an application for executing test cases and verifying changes. These benefits enable teams to resolve issues faster which make the more agile.<\/p>\n<h2 id=\"why-use-vagrant-and-ansible\">Why use Vagrant and Ansible?<\/h2>\n<p>Vagrant is a tool that will allow us to create a virtual environment easily and it eliminates pitfalls that cause the works-on-my-machine phenomenon. It can be used with multiple providers such as Oracle VirtualBox, VMware, Docker, and so on. It allows us to create a disposable environment by making use of configuration files.<\/p>\n<p>Ansible is an infrastructure automation engine that automates software configuration management. It is agentless and allows us to use SSH keys for connecting to remote machines. Ansible playbooks are written in yaml and offer inventory management in simple text files.<\/p>\n<h3 id=\"prerequisites\">Prerequisites<\/h3>\n<ul>\n<li>Vagrant should be installed on your machine. Installation binaries can be found <a href=\"https:\/\/www.vagrantup.com\/downloads.html\" target=\"_blank\">here<\/a>.<\/li>\n<li>Oracle VirtualBox can be used as a Vagrant provider or make use of similar providers as described in Vagrant&rsquo;s official <a href=\"https:\/\/www.vagrantup.com\/docs\/providers\/\" target=\"_blank\">documentation<\/a>.<\/li>\n<li>Ansible should be installed in your machine. Refer to the <a href=\"https:\/\/docs.ansible.com\/ansible\/latest\/installation_guide\/intro_installation.html\" target=\"_blank\">Ansible installation guide<\/a> for platform specific installation.<\/li>\n<\/ul>\n<h2 id=\"setup-overview\">Setup overview<\/h2>\n<p>We will be setting up a Kubernetes cluster that will consist of one master and two worker nodes. All the nodes will run Ubuntu Xenial 64-bit OS and Ansible playbooks will be used for provisioning.<\/p>\n<h4 id=\"step-1-creating-a-vagrantfile\">Step 1: Creating a Vagrantfile<\/h4>\n<p>Use the text editor of your choice and create a file with named <code>Vagrantfile<\/code>, inserting the code below. The value of N denotes the number of nodes present in the cluster, it can be modified accordingly. In the below example, we are setting the value of N as 2.<\/p>\n<div class=\"highlight\">\n<pre style=\"background-color:#f8f8f8\"><code class=\"language-ruby\" data-lang=\"ruby\"><span style=\"color:#800\">IMAGE_NAME<\/span> <span style=\"color:#666\">=<\/span> <span style=\"color:#b44\">&#034;bento\/ubuntu-16.04&#034;<\/span>\nN <span style=\"color:#666\">=<\/span> <span style=\"color:#666\">2<\/span>\n<span style=\"color:#800\">Vagrant<\/span><span style=\"color:#666\">.<\/span>configure(<span style=\"color:#b44\">&#034;2&#034;<\/span>) <span style=\"color:#a2f;font-weight:bold\">do<\/span> <span style=\"color:#666\">|<\/span>config<span style=\"color:#666\">|<\/span>\nconfig<span style=\"color:#666\">.<\/span>ssh<span style=\"color:#666\">.<\/span>insert_key <span style=\"color:#666\">=<\/span> <span style=\"color:#a2f\">false<\/span>\nconfig<span style=\"color:#666\">.<\/span>vm<span style=\"color:#666\">.<\/span>provider <span style=\"color:#b44\">&#034;virtualbox&#034;<\/span> <span style=\"color:#a2f;font-weight:bold\">do<\/span> <span style=\"color:#666\">|<\/span>v<span style=\"color:#666\">|<\/span>\nv<span style=\"color:#666\">.<\/span>memory <span style=\"color:#666\">=<\/span> <span style=\"color:#666\">1024<\/span>\nv<span style=\"color:#666\">.<\/span>cpus <span style=\"color:#666\">=<\/span> <span style=\"color:#666\">2<\/span>\n<span style=\"color:#a2f;font-weight:bold\">end<\/span>\nconfig<span style=\"color:#666\">.<\/span>vm<span style=\"color:#666\">.<\/span>define <span style=\"color:#b44\">&#034;k8s-master&#034;<\/span> <span style=\"color:#a2f;font-weight:bold\">do<\/span> <span style=\"color:#666\">|<\/span>master<span style=\"color:#666\">|<\/span>\nmaster<span style=\"color:#666\">.<\/span>vm<span style=\"color:#666\">.<\/span>box <span style=\"color:#666\">=<\/span> <span style=\"color:#800\">IMAGE_NAME<\/span>\nmaster<span style=\"color:#666\">.<\/span>vm<span style=\"color:#666\">.<\/span>network <span style=\"color:#b44\">&#034;private_network&#034;<\/span>, <span style=\"color:#b8860b\">ip<\/span>: <span style=\"color:#b44\">&#034;192.168.50.10&#034;<\/span>\nmaster<span style=\"color:#666\">.<\/span>vm<span style=\"color:#666\">.<\/span>hostname <span style=\"color:#666\">=<\/span> <span style=\"color:#b44\">&#034;k8s-master&#034;<\/span>\nmaster<span style=\"color:#666\">.<\/span>vm<span style=\"color:#666\">.<\/span>provision <span style=\"color:#b44\">&#034;ansible&#034;<\/span> <span style=\"color:#a2f;font-weight:bold\">do<\/span> <span style=\"color:#666\">|<\/span>ansible<span style=\"color:#666\">|<\/span>\nansible<span style=\"color:#666\">.<\/span>playbook <span style=\"color:#666\">=<\/span> <span style=\"color:#b44\">&#034;kubernetes-setup\/master-playbook.yml&#034;<\/span>\n<span style=\"color:#a2f;font-weight:bold\">end<\/span>\n<span style=\"color:#a2f;font-weight:bold\">end<\/span>\n(<span style=\"color:#666\">1<\/span><span style=\"color:#666\">..<\/span>N)<span style=\"color:#666\">.<\/span>each <span style=\"color:#a2f;font-weight:bold\">do<\/span> <span style=\"color:#666\">|<\/span>i<span style=\"color:#666\">|<\/span>\nconfig<span style=\"color:#666\">.<\/span>vm<span style=\"color:#666\">.<\/span>define <span style=\"color:#b44\">&#034;node-<\/span><span style=\"color:#b68;font-weight:bold\">#{<\/span>i<span style=\"color:#b68;font-weight:bold\">}<\/span><span style=\"color:#b44\">&#034;<\/span> <span style=\"color:#a2f;font-weight:bold\">do<\/span> <span style=\"color:#666\">|<\/span>node<span style=\"color:#666\">|<\/span>\nnode<span style=\"color:#666\">.<\/span>vm<span style=\"color:#666\">.<\/span>box <span style=\"color:#666\">=<\/span> <span style=\"color:#800\">IMAGE_NAME<\/span>\nnode<span style=\"color:#666\">.<\/span>vm<span style=\"color:#666\">.<\/span>network <span style=\"color:#b44\">&#034;private_network&#034;<\/span>, <span style=\"color:#b8860b\">ip<\/span>: <span style=\"color:#b44\">&#034;192.168.50.<\/span><span style=\"color:#b68;font-weight:bold\">#{<\/span>i <span style=\"color:#666\">+<\/span> <span style=\"color:#666\">10<\/span><span style=\"color:#b68;font-weight:bold\">}<\/span><span style=\"color:#b44\">&#034;<\/span>\nnode<span style=\"color:#666\">.<\/span>vm<span style=\"color:#666\">.<\/span>hostname <span style=\"color:#666\">=<\/span> <span style=\"color:#b44\">&#034;node-<\/span><span style=\"color:#b68;font-weight:bold\">#{<\/span>i<span style=\"color:#b68;font-weight:bold\">}<\/span><span style=\"color:#b44\">&#034;<\/span>\nnode<span style=\"color:#666\">.<\/span>vm<span style=\"color:#666\">.<\/span>provision <span style=\"color:#b44\">&#034;ansible&#034;<\/span> <span style=\"color:#a2f;font-weight:bold\">do<\/span> <span style=\"color:#666\">|<\/span>ansible<span style=\"color:#666\">|<\/span>\nansible<span style=\"color:#666\">.<\/span>playbook <span style=\"color:#666\">=<\/span> <span style=\"color:#b44\">&#034;kubernetes-setup\/node-playbook.yml&#034;<\/span>\n<span style=\"color:#a2f;font-weight:bold\">end<\/span>\n<span style=\"color:#a2f;font-weight:bold\">end<\/span>\n<span style=\"color:#a2f;font-weight:bold\">end<\/span><\/code><\/pre>\n<\/div>\n<h3 id=\"step-2-create-an-ansible-playbook-for-kubernetes-master\">Step 2: Create an Ansible playbook for Kubernetes master.<\/h3>\n<p>Create a directory named <code>kubernetes-setup<\/code> in the same directory as the <code>Vagrantfile<\/code>. Create two files named <code>master-playbook.yml<\/code> and <code>node-playbook.yml<\/code> in the directory <code>kubernetes-setup<\/code>.<\/p>\n<p>In the file <code>master-playbook.yml<\/code>, add the code below.<\/p>\n<h4 id=\"step-2-1-install-docker-and-its-dependent-components\">Step 2.1: Install Docker and its dependent components.<\/h4>\n<p>We will be installing the following packages, and then adding a user named \u201cvagrant\u201d to the \u201cdocker\u201d group.<br \/>\n&#8211; docker-ce<br \/>\n&#8211; docker-ce-cli<br \/>\n&#8211; containerd.io<\/p>\n<div class=\"highlight\">\n<pre style=\"background-color:#f8f8f8\"><code class=\"language-yaml\" data-lang=\"yaml\">---<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"><\/span>-<span style=\"color:#bbb\"> <\/span>hosts:<span style=\"color:#bbb\"> <\/span>all<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>become:<span style=\"color:#bbb\"> <\/span><span style=\"color:#a2f;font-weight:bold\">true<\/span><span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>tasks:<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>-<span style=\"color:#bbb\"> <\/span>name:<span style=\"color:#bbb\"> <\/span>Install<span style=\"color:#bbb\"> <\/span>packages<span style=\"color:#bbb\"> <\/span>that<span style=\"color:#bbb\"> <\/span>allow<span style=\"color:#bbb\"> <\/span>apt<span style=\"color:#bbb\"> <\/span>to<span style=\"color:#bbb\"> <\/span>be<span style=\"color:#bbb\"> <\/span>used<span style=\"color:#bbb\"> <\/span>over<span style=\"color:#bbb\"> <\/span>HTTPS<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>apt:<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>name:<span style=\"color:#bbb\"> <\/span><span style=\"color:#b44\">&#034;{{ packages }}&#034;<\/span><span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>state:<span style=\"color:#bbb\"> <\/span>present<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>update_cache:<span style=\"color:#bbb\"> <\/span>yes<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>vars:<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>packages:<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>-<span style=\"color:#bbb\"> <\/span>apt-transport-https<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>-<span style=\"color:#bbb\"> <\/span>ca-certificates<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>-<span style=\"color:#bbb\"> <\/span>curl<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>-<span style=\"color:#bbb\"> <\/span>gnupg-agent<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>-<span style=\"color:#bbb\"> <\/span>software-properties-common<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>-<span style=\"color:#bbb\"> <\/span>name:<span style=\"color:#bbb\"> <\/span>Add<span style=\"color:#bbb\"> <\/span>an<span style=\"color:#bbb\"> <\/span>apt<span style=\"color:#bbb\"> <\/span>signing<span style=\"color:#bbb\"> <\/span>key<span style=\"color:#bbb\"> <\/span>for<span style=\"color:#bbb\"> <\/span>Docker<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>apt_key:<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>url:<span style=\"color:#bbb\"> <\/span>https:\/\/download.docker.com\/linux\/ubuntu\/gpg<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>state:<span style=\"color:#bbb\"> <\/span>present<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>-<span style=\"color:#bbb\"> <\/span>name:<span style=\"color:#bbb\"> <\/span>Add<span style=\"color:#bbb\"> <\/span>apt<span style=\"color:#bbb\"> <\/span>repository<span style=\"color:#bbb\"> <\/span>for<span style=\"color:#bbb\"> <\/span>stable<span style=\"color:#bbb\"> <\/span>version<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>apt_repository:<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>repo:<span style=\"color:#bbb\"> <\/span>deb<span style=\"color:#bbb\"> <\/span>[arch=amd64]<span style=\"color:#bbb\"> <\/span>https:\/\/download.docker.com\/linux\/ubuntu<span style=\"color:#bbb\"> <\/span>xenial<span style=\"color:#bbb\"> <\/span>stable<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>state:<span style=\"color:#bbb\"> <\/span>present<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>-<span style=\"color:#bbb\"> <\/span>name:<span style=\"color:#bbb\"> <\/span>Install<span style=\"color:#bbb\"> <\/span>docker<span style=\"color:#bbb\"> <\/span>and<span style=\"color:#bbb\"> <\/span>its<span style=\"color:#bbb\"> <\/span>dependecies<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>apt:<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>name:<span style=\"color:#bbb\"> <\/span><span style=\"color:#b44\">&#034;{{ packages }}&#034;<\/span><span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>state:<span style=\"color:#bbb\"> <\/span>present<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>update_cache:<span style=\"color:#bbb\"> <\/span>yes<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>vars:<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>packages:<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>-<span style=\"color:#bbb\"> <\/span>docker-ce<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>-<span style=\"color:#bbb\"> <\/span>docker-ce-cli<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>-<span style=\"color:#bbb\"> <\/span>containerd.io<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>notify:<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>-<span style=\"color:#bbb\"> <\/span>docker<span style=\"color:#bbb\"> <\/span>status<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>-<span style=\"color:#bbb\"> <\/span>name:<span style=\"color:#bbb\"> <\/span>Add<span style=\"color:#bbb\"> <\/span>vagrant<span style=\"color:#bbb\"> <\/span>user<span style=\"color:#bbb\"> <\/span>to<span style=\"color:#bbb\"> <\/span>docker<span style=\"color:#bbb\"> <\/span>group<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>user:<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>name:<span style=\"color:#bbb\"> <\/span>vagrant<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>group:<span style=\"color:#bbb\"> <\/span>docker<\/code><\/pre>\n<\/div>\n<h4 id=\"step-2-2-kubelet-will-not-start-if-the-system-has-swap-enabled-so-we-are-disabling-swap-using-the-below-code\">Step 2.2: Kubelet will not start if the system has swap enabled, so we are disabling swap using the below code.<\/h4>\n<div class=\"highlight\">\n<pre style=\"background-color:#f8f8f8\"><code class=\"language-yaml\" data-lang=\"yaml\"><span style=\"color:#bbb\"> <\/span>-<span style=\"color:#bbb\"> <\/span>name:<span style=\"color:#bbb\"> <\/span>Remove<span style=\"color:#bbb\"> <\/span>swapfile<span style=\"color:#bbb\"> <\/span>from<span style=\"color:#bbb\"> <\/span>\/etc\/fstab<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>mount:<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>name:<span style=\"color:#bbb\"> <\/span><span style=\"color:#b44\">&#034;{{ item }}&#034;<\/span><span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>fstype:<span style=\"color:#bbb\"> <\/span>swap<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>state:<span style=\"color:#bbb\"> <\/span>absent<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>with_items:<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>-<span style=\"color:#bbb\"> <\/span>swap<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>-<span style=\"color:#bbb\"> <\/span>none<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>-<span style=\"color:#bbb\"> <\/span>name:<span style=\"color:#bbb\"> <\/span>Disable<span style=\"color:#bbb\"> <\/span>swap<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>command:<span style=\"color:#bbb\"> <\/span>swapoff<span style=\"color:#bbb\"> <\/span>-a<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>when:<span style=\"color:#bbb\"> <\/span>ansible_swaptotal_mb<span style=\"color:#bbb\"> <\/span><span style=\"color:#b44;font-style:italic\">&gt; 0<\/span><\/code><\/pre>\n<\/div>\n<h4 id=\"step-2-3-installing-kubelet-kubeadm-and-kubectl-using-the-below-code\">Step 2.3: Installing kubelet, kubeadm and kubectl using the below code.<\/h4>\n<div class=\"highlight\">\n<pre style=\"background-color:#f8f8f8\"><code class=\"language-yaml\" data-lang=\"yaml\"><span style=\"color:#bbb\"> <\/span>-<span style=\"color:#bbb\"> <\/span>name:<span style=\"color:#bbb\"> <\/span>Add<span style=\"color:#bbb\"> <\/span>an<span style=\"color:#bbb\"> <\/span>apt<span style=\"color:#bbb\"> <\/span>signing<span style=\"color:#bbb\"> <\/span>key<span style=\"color:#bbb\"> <\/span>for<span style=\"color:#bbb\"> <\/span>Kubernetes<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>apt_key:<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>url:<span style=\"color:#bbb\"> <\/span>https:\/\/packages.cloud.google.com\/apt\/doc\/apt-key.gpg<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>state:<span style=\"color:#bbb\"> <\/span>present<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>-<span style=\"color:#bbb\"> <\/span>name:<span style=\"color:#bbb\"> <\/span>Adding<span style=\"color:#bbb\"> <\/span>apt<span style=\"color:#bbb\"> <\/span>repository<span style=\"color:#bbb\"> <\/span>for<span style=\"color:#bbb\"> <\/span>Kubernetes<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>apt_repository:<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>repo:<span style=\"color:#bbb\"> <\/span>deb<span style=\"color:#bbb\"> <\/span>https:\/\/apt.kubernetes.io\/<span style=\"color:#bbb\"> <\/span>kubernetes-xenial<span style=\"color:#bbb\"> <\/span>main<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>state:<span style=\"color:#bbb\"> <\/span>present<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>filename:<span style=\"color:#bbb\"> <\/span>kubernetes.list<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>-<span style=\"color:#bbb\"> <\/span>name:<span style=\"color:#bbb\"> <\/span>Install<span style=\"color:#bbb\"> <\/span>Kubernetes<span style=\"color:#bbb\"> <\/span>binaries<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>apt:<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>name:<span style=\"color:#bbb\"> <\/span><span style=\"color:#b44\">&#034;{{ packages }}&#034;<\/span><span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>state:<span style=\"color:#bbb\"> <\/span>present<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>update_cache:<span style=\"color:#bbb\"> <\/span>yes<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>vars:<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>packages:<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>-<span style=\"color:#bbb\"> <\/span>kubelet<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>-<span style=\"color:#bbb\"> <\/span>kubeadm<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>-<span style=\"color:#bbb\"> <\/span>kubectl<\/code><\/pre>\n<\/div>\n<h4 id=\"step-2-3-initialize-the-kubernetes-cluster-with-kubeadm-using-the-below-code-applicable-only-on-master-node\">Step 2.3: Initialize the Kubernetes cluster with kubeadm using the below code (applicable only on master node).<\/h4>\n<div class=\"highlight\">\n<pre style=\"background-color:#f8f8f8\"><code class=\"language-yaml\" data-lang=\"yaml\"><span style=\"color:#bbb\"> <\/span>-<span style=\"color:#bbb\"> <\/span>name:<span style=\"color:#bbb\"> <\/span>Initialize<span style=\"color:#bbb\"> <\/span>the<span style=\"color:#bbb\"> <\/span>Kubernetes<span style=\"color:#bbb\"> <\/span>cluster<span style=\"color:#bbb\"> <\/span>using<span style=\"color:#bbb\"> <\/span>kubeadm<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>command:<span style=\"color:#bbb\"> <\/span>kubeadm<span style=\"color:#bbb\"> <\/span>init<span style=\"color:#bbb\"> <\/span>--apiserver-advertise-address=<span style=\"color:#b44\">&#034;192.168.50.10&#034;<\/span><span style=\"color:#bbb\"> <\/span>--apiserver-cert-extra-sans=<span style=\"color:#b44\">&#034;192.168.50.10&#034;<\/span><span style=\"color:#bbb\"> <\/span>--node-name<span style=\"color:#bbb\"> <\/span>k8s-master<span style=\"color:#bbb\"> <\/span>--pod-network-cidr=<span style=\"color:#666\">192.168<\/span>.<span style=\"color:#666\">0.0<\/span>\/<span style=\"color:#666\">16<\/span><\/code><\/pre>\n<\/div>\n<h4 id=\"step-2-4-setup-the-kube-config-file-for-the-vagrant-user-to-access-the-kubernetes-cluster-using-the-below-code\">Step 2.4: Setup the kube config file for the vagrant user to access the Kubernetes cluster using the below code.<\/h4>\n<div class=\"highlight\">\n<pre style=\"background-color:#f8f8f8\"><code class=\"language-yaml\" data-lang=\"yaml\"><span style=\"color:#bbb\"> <\/span>-<span style=\"color:#bbb\"> <\/span>name:<span style=\"color:#bbb\"> <\/span>Setup<span style=\"color:#bbb\"> <\/span>kubeconfig<span style=\"color:#bbb\"> <\/span>for<span style=\"color:#bbb\"> <\/span>vagrant<span style=\"color:#bbb\"> <\/span>user<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>command:<span style=\"color:#bbb\"> <\/span><span style=\"color:#b44\">&#034;{{ item }}&#034;<\/span><span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>with_items:<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>-<span style=\"color:#bbb\"> <\/span>mkdir<span style=\"color:#bbb\"> <\/span>-p<span style=\"color:#bbb\"> <\/span>\/home\/vagrant\/.kube<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>-<span style=\"color:#bbb\"> <\/span>cp<span style=\"color:#bbb\"> <\/span>-i<span style=\"color:#bbb\"> <\/span>\/etc\/kubernetes\/admin.conf<span style=\"color:#bbb\"> <\/span>\/home\/vagrant\/.kube\/config<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>-<span style=\"color:#bbb\"> <\/span>chown<span style=\"color:#bbb\"> <\/span>vagrant:vagrant<span style=\"color:#bbb\"> <\/span>\/home\/vagrant\/.kube\/config<\/code><\/pre>\n<\/div>\n<h4 id=\"step-2-5-setup-the-container-networking-provider-and-the-network-policy-engine-using-the-below-code\">Step 2.5: Setup the container networking provider and the network policy engine using the below code.<\/h4>\n<div class=\"highlight\">\n<pre style=\"background-color:#f8f8f8\"><code class=\"language-yaml\" data-lang=\"yaml\"><span style=\"color:#bbb\"> <\/span>-<span style=\"color:#bbb\"> <\/span>name:<span style=\"color:#bbb\"> <\/span>Install<span style=\"color:#bbb\"> <\/span>calico<span style=\"color:#bbb\"> <\/span>pod<span style=\"color:#bbb\"> <\/span>network<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>become:<span style=\"color:#bbb\"> <\/span><span style=\"color:#a2f;font-weight:bold\">false<\/span><span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>command:<span style=\"color:#bbb\"> <\/span>kubectl<span style=\"color:#bbb\"> <\/span>create<span style=\"color:#bbb\"> <\/span>-f<span style=\"color:#bbb\"> <\/span>https:\/\/docs.projectcalico.org\/v3.<span style=\"color:#666\">4<\/span>\/getting-started\/kubernetes\/installation\/hosted\/calico.yaml<\/code><\/pre>\n<\/div>\n<h4 id=\"step-2-6-generate-kube-join-command-for-joining-the-node-to-the-kubernetes-cluster-and-store-the-command-in-the-file-named-join-command\">Step 2.6: Generate kube join command for joining the node to the Kubernetes cluster and store the command in the file named <code>join-command<\/code>.<\/h4>\n<div class=\"highlight\">\n<pre style=\"background-color:#f8f8f8\"><code class=\"language-yaml\" data-lang=\"yaml\"><span style=\"color:#bbb\"> <\/span>-<span style=\"color:#bbb\"> <\/span>name:<span style=\"color:#bbb\"> <\/span>Generate<span style=\"color:#bbb\"> <\/span>join<span style=\"color:#bbb\"> <\/span>command<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>command:<span style=\"color:#bbb\"> <\/span>kubeadm<span style=\"color:#bbb\"> <\/span>token<span style=\"color:#bbb\"> <\/span>create<span style=\"color:#bbb\"> <\/span>--print-join-command<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>register:<span style=\"color:#bbb\"> <\/span>join_command<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>-<span style=\"color:#bbb\"> <\/span>name:<span style=\"color:#bbb\"> <\/span>Copy<span style=\"color:#bbb\"> <\/span>join<span style=\"color:#bbb\"> <\/span>command<span style=\"color:#bbb\"> <\/span>to<span style=\"color:#bbb\"> <\/span>local<span style=\"color:#bbb\"> <\/span>file<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>local_action:<span style=\"color:#bbb\"> <\/span>copy<span style=\"color:#bbb\"> <\/span>content=<span style=\"color:#b44\">&#034;{{ join_command.stdout_lines[0] }}&#034;<\/span><span style=\"color:#bbb\"> <\/span>dest=<span style=\"color:#b44\">&#034;.\/join-command&#034;<\/span><\/code><\/pre>\n<\/div>\n<h4 id=\"step-2-7-setup-a-handler-for-checking-docker-daemon-using-the-below-code\">Step 2.7: Setup a handler for checking Docker daemon using the below code.<\/h4>\n<div class=\"highlight\">\n<pre style=\"background-color:#f8f8f8\"><code class=\"language-yaml\" data-lang=\"yaml\"><span style=\"color:#bbb\"> <\/span>handlers:<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>-<span style=\"color:#bbb\"> <\/span>name:<span style=\"color:#bbb\"> <\/span>docker<span style=\"color:#bbb\"> <\/span>status<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>service:<span style=\"color:#bbb\"> <\/span>name=docker<span style=\"color:#bbb\"> <\/span>state=started<\/code><\/pre>\n<\/div>\n<h4 id=\"step-3-create-the-ansible-playbook-for-kubernetes-node\">Step 3: Create the Ansible playbook for Kubernetes node.<\/h4>\n<p>Create a file named <code>node-playbook.yml<\/code> in the directory <code>kubernetes-setup<\/code>.<\/p>\n<p>Add the code below into <code>node-playbook.yml<\/code><\/p>\n<h4 id=\"step-3-1-start-adding-the-code-from-steps-2-1-till-2-3\">Step 3.1: Start adding the code from Steps 2.1 till 2.3.<\/h4>\n<h4 id=\"step-3-2-join-the-nodes-to-the-kubernetes-cluster-using-below-code\">Step 3.2: Join the nodes to the Kubernetes cluster using below code.<\/h4>\n<div class=\"highlight\">\n<pre style=\"background-color:#f8f8f8\"><code class=\"language-yaml\" data-lang=\"yaml\"><span style=\"color:#bbb\"> <\/span>-<span style=\"color:#bbb\"> <\/span>name:<span style=\"color:#bbb\"> <\/span>Copy<span style=\"color:#bbb\"> <\/span>the<span style=\"color:#bbb\"> <\/span>join<span style=\"color:#bbb\"> <\/span>command<span style=\"color:#bbb\"> <\/span>to<span style=\"color:#bbb\"> <\/span>server<span style=\"color:#bbb\"> <\/span>location<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>copy:<span style=\"color:#bbb\"> <\/span>src=join-command<span style=\"color:#bbb\"> <\/span>dest=\/tmp\/join-command.sh<span style=\"color:#bbb\"> <\/span>mode=<span style=\"color:#666\">0777<\/span><span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>-<span style=\"color:#bbb\"> <\/span>name:<span style=\"color:#bbb\"> <\/span>Join<span style=\"color:#bbb\"> <\/span>the<span style=\"color:#bbb\"> <\/span>node<span style=\"color:#bbb\"> <\/span>to<span style=\"color:#bbb\"> <\/span>cluster<span style=\"color:#bbb\">\n<\/span><span style=\"color:#bbb\"> <\/span>command:<span style=\"color:#bbb\"> <\/span>sh<span style=\"color:#bbb\"> <\/span>\/tmp\/join-command.sh<\/code><\/pre>\n<\/div>\n<h4 id=\"step-3-3-add-the-code-from-step-2-7-to-finish-this-playbook\">Step 3.3: Add the code from step 2.7 to finish this playbook.<\/h4>\n<h4 id=\"step-4-upon-completing-the-vagrantfile-and-playbooks-follow-the-below-steps\">Step 4: Upon completing the Vagrantfile and playbooks follow the below steps.<\/h4>\n<div class=\"highlight\">\n<pre style=\"background-color:#f8f8f8\"><code class=\"language-shell\" data-lang=\"shell\">$ <span style=\"color:#a2f\">cd<\/span> \/path\/to\/Vagrantfile\n$ vagrant up<\/code><\/pre>\n<\/div>\n<p>Upon completion of all the above steps, the Kubernetes cluster should be up and running.<br \/>\nWe can login to the master or worker nodes using Vagrant as follows:<\/p>\n<div class=\"highlight\">\n<pre style=\"background-color:#f8f8f8\"><code class=\"language-shell\" data-lang=\"shell\">$ <span style=\"color:#080;font-style:italic\">## Accessing master<\/span>\n$ vagrant ssh k8s-master\nvagrant@k8s-master:~$ kubectl get nodes\nNAME STATUS ROLES AGE VERSION\nk8s-master Ready master 18m v1.13.3\nnode-1 Ready &lt;none&gt; 12m v1.13.3\nnode-2 Ready &lt;none&gt; 6m22s v1.13.3\n$ <span style=\"color:#080;font-style:italic\">## Accessing nodes<\/span>\n$ vagrant ssh node-1\n$ vagrant ssh node-2<\/code><\/pre>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Author: Naresh L J (Infosys) Objective This blog post describes the steps required to setup a multi node Kubernetes cluster for development purposes. This setup provides a production-like cluster that can be setup on your local machine. Why do we require multi node cluster setup? Multi node Kubernetes clusters offer a production-like environment which has [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.9.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Blog: Kubernetes Setup Using Ansible and Vagrant - Howk IT-Dienstleistungen<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/howk.de\/?p=5940\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Blog: Kubernetes Setup Using Ansible and Vagrant - Howk IT-Dienstleistungen\" \/>\n<meta property=\"og:description\" content=\"Author: Naresh L J (Infosys) Objective This blog post describes the steps required to setup a multi node Kubernetes cluster for development purposes. This setup provides a production-like cluster that can be setup on your local machine. Why do we require multi node cluster setup? Multi node Kubernetes clusters offer a production-like environment which has [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/howk.de\/?p=5940\" \/>\n<meta property=\"og:site_name\" content=\"Howk IT-Dienstleistungen\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/howk.de\" \/>\n<meta property=\"article:published_time\" content=\"2019-03-15T17:00:02+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/howk.de\/?p=5940#article\",\"isPartOf\":{\"@id\":\"https:\/\/howk.de\/?p=5940\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/howk.de\/#\/schema\/person\/b029bd02d4f35dce869ef54c81a100c5\"},\"headline\":\"Blog: Kubernetes Setup Using Ansible and Vagrant\",\"datePublished\":\"2019-03-15T17:00:02+00:00\",\"dateModified\":\"2019-03-15T17:00:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/howk.de\/?p=5940\"},\"wordCount\":649,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/howk.de\/#organization\"},\"articleSection\":[\"Hi Tech\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/howk.de\/?p=5940#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/howk.de\/?p=5940\",\"url\":\"https:\/\/howk.de\/?p=5940\",\"name\":\"Blog: Kubernetes Setup Using Ansible and Vagrant - Howk IT-Dienstleistungen\",\"isPartOf\":{\"@id\":\"https:\/\/howk.de\/#website\"},\"datePublished\":\"2019-03-15T17:00:02+00:00\",\"dateModified\":\"2019-03-15T17:00:02+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/howk.de\/?p=5940#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/howk.de\/?p=5940\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/howk.de\/?p=5940#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/howk.de\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Blog: Kubernetes Setup Using Ansible and Vagrant\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/howk.de\/#website\",\"url\":\"https:\/\/howk.de\/\",\"name\":\"Howk IT-Dienstleistungen\",\"description\":\"Howk IT Services - Howk IT-Dienstleistungen\",\"publisher\":{\"@id\":\"https:\/\/howk.de\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/howk.de\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/howk.de\/#organization\",\"name\":\"HowK\",\"url\":\"https:\/\/howk.de\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/howk.de\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/howk.de\/w1\/wp-content\/uploads\/2013\/12\/howk-logo.png\",\"contentUrl\":\"https:\/\/howk.de\/w1\/wp-content\/uploads\/2013\/12\/howk-logo.png\",\"width\":170,\"height\":170,\"caption\":\"HowK\"},\"image\":{\"@id\":\"https:\/\/howk.de\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/howk.de\",\"http:\/\/de.linkedin.com\/in\/howkde\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/howk.de\/#\/schema\/person\/b029bd02d4f35dce869ef54c81a100c5\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/howk.de\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b5a20f4d07bca1b73f25cff58a1116c4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b5a20f4d07bca1b73f25cff58a1116c4?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"url\":\"https:\/\/howk.de\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Blog: Kubernetes Setup Using Ansible and Vagrant - Howk IT-Dienstleistungen","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/howk.de\/?p=5940","og_locale":"en_US","og_type":"article","og_title":"Blog: Kubernetes Setup Using Ansible and Vagrant - Howk IT-Dienstleistungen","og_description":"Author: Naresh L J (Infosys) Objective This blog post describes the steps required to setup a multi node Kubernetes cluster for development purposes. This setup provides a production-like cluster that can be setup on your local machine. Why do we require multi node cluster setup? Multi node Kubernetes clusters offer a production-like environment which has [&hellip;]","og_url":"https:\/\/howk.de\/?p=5940","og_site_name":"Howk IT-Dienstleistungen","article_publisher":"https:\/\/www.facebook.com\/howk.de","article_published_time":"2019-03-15T17:00:02+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/howk.de\/?p=5940#article","isPartOf":{"@id":"https:\/\/howk.de\/?p=5940"},"author":{"name":"admin","@id":"https:\/\/howk.de\/#\/schema\/person\/b029bd02d4f35dce869ef54c81a100c5"},"headline":"Blog: Kubernetes Setup Using Ansible and Vagrant","datePublished":"2019-03-15T17:00:02+00:00","dateModified":"2019-03-15T17:00:02+00:00","mainEntityOfPage":{"@id":"https:\/\/howk.de\/?p=5940"},"wordCount":649,"commentCount":0,"publisher":{"@id":"https:\/\/howk.de\/#organization"},"articleSection":["Hi Tech"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/howk.de\/?p=5940#respond"]}]},{"@type":"WebPage","@id":"https:\/\/howk.de\/?p=5940","url":"https:\/\/howk.de\/?p=5940","name":"Blog: Kubernetes Setup Using Ansible and Vagrant - Howk IT-Dienstleistungen","isPartOf":{"@id":"https:\/\/howk.de\/#website"},"datePublished":"2019-03-15T17:00:02+00:00","dateModified":"2019-03-15T17:00:02+00:00","breadcrumb":{"@id":"https:\/\/howk.de\/?p=5940#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/howk.de\/?p=5940"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/howk.de\/?p=5940#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/howk.de\/"},{"@type":"ListItem","position":2,"name":"Blog: Kubernetes Setup Using Ansible and Vagrant"}]},{"@type":"WebSite","@id":"https:\/\/howk.de\/#website","url":"https:\/\/howk.de\/","name":"Howk IT-Dienstleistungen","description":"Howk IT Services - Howk IT-Dienstleistungen","publisher":{"@id":"https:\/\/howk.de\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/howk.de\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/howk.de\/#organization","name":"HowK","url":"https:\/\/howk.de\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/howk.de\/#\/schema\/logo\/image\/","url":"https:\/\/howk.de\/w1\/wp-content\/uploads\/2013\/12\/howk-logo.png","contentUrl":"https:\/\/howk.de\/w1\/wp-content\/uploads\/2013\/12\/howk-logo.png","width":170,"height":170,"caption":"HowK"},"image":{"@id":"https:\/\/howk.de\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/howk.de","http:\/\/de.linkedin.com\/in\/howkde"]},{"@type":"Person","@id":"https:\/\/howk.de\/#\/schema\/person\/b029bd02d4f35dce869ef54c81a100c5","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/howk.de\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b5a20f4d07bca1b73f25cff58a1116c4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b5a20f4d07bca1b73f25cff58a1116c4?s=96&d=mm&r=g","caption":"admin"},"url":"https:\/\/howk.de\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/howk.de\/index.php?rest_route=\/wp\/v2\/posts\/5940"}],"collection":[{"href":"https:\/\/howk.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/howk.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/howk.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/howk.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5940"}],"version-history":[{"count":0,"href":"https:\/\/howk.de\/index.php?rest_route=\/wp\/v2\/posts\/5940\/revisions"}],"wp:attachment":[{"href":"https:\/\/howk.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5940"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/howk.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5940"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/howk.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5940"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}