DEV Community

Cover image for Setting Up Kubernetes: A Technical Guide to Dependencies Installation and Setup
Mayank Gupta
Mayank Gupta

Posted on

Setting Up Kubernetes: A Technical Guide to Dependencies Installation and Setup

Kubernetes has revolutionized the way we deploy, manage, and scale containerized applications. However, before diving into its powerful orchestration capabilities, setting up the dependencies correctly is crucial. In this guide, we'll walk through the essential dependencies required to run Kubernetes, covering local setup with Minikube and installation of kubectl.


Understanding Kubernetes Setup

Kubernetes is not just a tool—it is a framework that provides a collection of utilities to deploy applications effectively. Unlike traditional cloud infrastructure tools, Kubernetes enables you to fully own and manage your remote machines with the following tasks:

  • Creating clusters and nodes (Master & Worker nodes).
  • Setting up Kubernetes services like API Server, kubelet, and other components.
  • Configuring cloud provider resources such as Load Balancers and File Systems.

Since manual deployment of containers is error-prone and difficult to manage, Kubernetes helps by:

  • Creating and managing objects like Pods.
  • Monitoring, scaling, and recreating Pods when necessary.
  • Utilizing available cloud resources to execute your configurations efficiently.

EKS vs. Kubermatic: What’s the Difference?

Both EKS (Amazon Elastic Kubernetes Service) and Kubermatic are software solutions designed for Kubernetes. However, they are not native Kubernetes components but rather third-party services designed to simplify cluster management.

  • Amazon EKS: Managed Kubernetes service by AWS that automates cluster provisioning and scaling.
  • Kubermatic: A Kubernetes automation tool allowing enterprises to manage multi-cluster environments efficiently.

Setting Up Kubernetes Locally

Regardless of the deployment platform, Kubernetes requires a cluster, which consists of:

  • Master Node: Contains API server, scheduler, and essential control plane components.
  • Worker Nodes: Hosts application containers and requires Docker.

kubectl

Installing Kubernetes Dependencies

To simulate a Kubernetes cluster locally, we use Minikube, a tool that sets up a Kubernetes environment inside a virtual machine. Before installing Minikube, ensure you have:

  1. Homebrew installed (for macOS users)
  2. Docker or a compatible hypervisor

Installing kubectl

Kubectl is the command-line tool for managing Kubernetes clusters. Follow these steps:

  1. Install Homebrew (if not installed):

  2. Install kubectl using Homebrew:

   brew install kubectl
Enter fullscreen mode Exit fullscreen mode

Or alternatively:

   brew install kubernetes-cli
Enter fullscreen mode Exit fullscreen mode

Verify installation:

   kubectl version --client
Enter fullscreen mode Exit fullscreen mode

Installing Minikube

  1. Install Minikube using Homebrew:
   brew install minikube
Enter fullscreen mode Exit fullscreen mode
  1. If Minikube fails to execute correctly, unlink and relink the binary:
   brew unlink minikube  
   brew link minikube  
Enter fullscreen mode Exit fullscreen mode
  1. Ensure Docker or a compatible hypervisor is running in the background. Then, start Minikube:
   minikube start
Enter fullscreen mode Exit fullscreen mode

If Minikube fails to start, refer to the Minikube Drivers documentation for help setting up the correct virtual machine manager.


Exploring Kubernetes Dashboard

Once Minikube is up and running, access the Kubernetes dashboard using:

minikube dashboard
Enter fullscreen mode Exit fullscreen mode

This opens a web-based interface to visualize cluster resources, monitor deployments, and troubleshoot issues.

minikube-dashboard`

Conclusion

Setting up Kubernetes locally with Minikube provides a robust environment for testing configurations before moving to production. By installing kubectl, setting up Minikube, and understanding Kubernetes architecture, you are now equipped to manage Kubernetes effectively.

If you have any questions or need assistance, refer to the official Kubernetes Documentation for more insights.

Happy Kubernetes-ing! 🚀

Top comments (0)