Personal Development Category (English)728x90

Run your local Kubernetes clusters with Kind

Disclosure: This page uses affiliate links.When you click an affliate link,we get a small compensation at no cost to you.Thanks for your support!Learn more

If you’re looking for Kubernetes Cluster for your local development then kind is the best choice. Basically, kind was primarily designed for testing Kubernetes itself but may be used for local development or CI. In this post, we take look steps on how to configure, deploy sample application onto to kind cluster.

Image - kind Logo

Image – kind tool logo

kind is more like Minikube which is a lightweight Kubernetes implementation that creates a VM on your local machine and deploys a simple cluster containing only one node. Minikube is available for Linux, macOS, and Windows systems.

Step #1: Install kind

Stable binaries for kind are available on the releases page. To install, download the respective binary for your platform and place into your $PATH. Here I’m using Linux so I have downloaded *amd64 binary release.

curl -Lo ./kind$(uname)-amd64
chmod +x ./kind
mv ./kind /some-dir-in-your-PATH/kind


Image – Download kind binary

Subscribe to Emails

More than 100,000 subscribers across the world trust & read Upnxtblog articles. Subscribe to emails updates!
* indicates required

Once the binary is downloaded place kind binary into your $PATH.

Image – Place downloaded kind binary into your path

Image – kind version

Devops Engineer Masters Program will make you proficient in DevOps principles like CI/CD, Continuous Monitoring and Continuous Delivery, using tools like Puppet, Nagios, Chef, Docker, Git & Jenkins. It includes training on Linux, Python, Docker, AWS DevOps Certification Training and Splunk. The curriculum has been determined by extensive research on 5000+ job descriptions across the globe.
New customer offer! Top courses from $13.99 when you first visit Udemy

kind does not require kubectl, but you will not be able to continue on the below sample deployment.

Step #2: kubectl installation

kubectl is the Kubernetes command-line tool that allows you to run commands against Kubernetes clusters. You can use kubectl to deploy applications, inspect and manage cluster resources, and view logs.

Recover over 700 unique file formats. Fully recover documents, emails, photos, videos, audio files and more. Supports 8 different data lost scenarios: deleted files recovery, recycle bin recovery, formatted drive recovery, lost partition recovery, externa

Download the latest release of kubectl with the following command:

curl -LO$(curl -s

Make the kubectl binary executable chmod +x ./kubectl and Move the binary into your PATH sudo mv ./kubectl /usr/local/bin/kubectl

To check if the kubectl configuration is successful, run kubectl from the terminal.

Step #3: Create a new cluster

Now that we have the basic setup ready, we can set up a new cluster. kind create cluster command would create a new cluster. This command will bootstrap a Kubernetes cluster using a pre-built node image.

Image – Create new cluster

By default, the cluster will be named as kind. If you wish to name it differently, use the --name flag to assign a different context name.Use kubectl command to inspect the cluster that we have created.

Image – View cluster info

Career Category (English)640x480

In order for kubectl to find and access a Kubernetes cluster, it needs a kubeconfig file, which is created automatically when you create a cluster but here if you have noticed,I have supplied --context to the command to look for the cluster.

You can also check the nodes in the cluster using kubectl get nodes command.

Image – View nodes of the cluster

Step #4 : Deploy Nginx app to one of the nodes of the cluster

Let’s run our first app on Kubernetes cluster with the kubectl applycommand. The applycommand creates a new deployment. We need to provide the deployment YAML configuration, I have provided one of the sample Nginx application.

Image – Deploy Nginx app

Google IT Support Professional Certificate by Grow with Google (300x600) - 2

Congrats! We have just deployed the first application by creating a deployment. Following is what the command has done for us:

  1. Searched for a suitable node where an instance of the application could be run (currently we have only 1 available node)
  2. Scheduled the Nginx application to run on that node.
  3. Configured the cluster to reschedule the instance on a new Node when needed.

Here is the deployment configuration that we have deployed:

apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
  name: nginx-deployment
      app: nginx
  replicas: 2 # tells deployment to run 2 pods matching the template
        app: nginx
      - name: nginx
        image: nginx:1.14.2
        - containerPort: 80


Image – View pods that are currently active

Once the application instances are created, a Kubernetes Deployment Controller continuously monitors those instances. If the Node hosting an instance goes down or is deleted, the Deployment controller replaces it.

To list your deployments, use the get deployments command:

Image – View list of deployments

Some of the useful kubectl commands are below.

  • kubectl getlist resources
  • kubectl describeshow detailed information about a resource
  • kubectl logsprint the logs from a container in a pod
  • kubectl execexecute a command on a container in a pod

Step #5 : Expose Nginx app outside of the cluster

To expose the app on to the outside world, use expose deployment command. Pods that are running inside Kubernetes are running on a private, isolated network. By default, they are visible from other pods and services within the same Kubernetes cluster, but not outside that network.

To see the Nginx landing page, you can do so by navigating to the http://localhost:80

Start your future with a Data Analysis Certificate.

Step #6 : Delete app and cluster

To delete the app, run delete deployment command:

kubectl delete deployment nginx-deployment

For deleting the cluster,use the following command:

kind delete cluster


Like this post? Don’t forget to share it!

Online business courses to jumpstart your future.

Additional Resources :

Run your local Kubernetes clusters with Kind
Article Name
Run your local Kubernetes clusters with Kind
In this post, we take look steps on how to configure, deploy sample application onto to kind cluster.
Publisher Name
Publisher Logo

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: