DevOps Essentials: Must-Have Tools for Starting Out

DevOps Essentials: Must-Have Tools for Starting Out

In the previous article, I discussed setting up and using Linux on Windows through a feature known as WSL.

In this blog post, I will share some essential tools that you need to install on your local system (in this case, I'm using WSL(Ubuntu) as the local system) to embark on your DevOps journey.

I will install essential tools such as Docker, Minikube, and Kubectl, which are crucial for beginning your DevOps journey. Additionally, we will cover other tools like Jenkins, Terraform, and Ansible later in the series when discussing their respective topics.

Let's start by installing these tools.


Installing Docker

Overview

Docker is an open platform that allows for efficient application development, shipping, and running by separating applications from infrastructure, enabling rapid software delivery and streamlined infrastructure management.

Installation

  • First, install the Linux kernel update package.

  • Download the latest version of Docker Desktop by visiting this link, and then proceed to install Docker Desktop.

  • If your system is compatible, Docker Desktop will prompt you to enable WSL 2 during the installation process. If not, navigate to Settings > General and select the "Use the WSL 2 based engine" option. This option is enabled by default if your device supports WSL 2.

  • Additionally, verify if the WSL integration for your default WSL distribution is enabled. To do this, go to Settings > Resources > WSL Integration and check if the "Enable integration with my default WSL distro" option is selected. If not, choose this option.

  • Now click Apply & Restart.

  • Now, execute this command within your installed WSL distribution.

      docker run hello-world
    

    You will receive this type of output:

  • You can refer to this doc for more help.

  • You also need to enable Kubernetes through the Docker settings. To do this, open the Docker Desktop settings, navigate to the Kubernetes tab, and select the "Enable Kubernetes" option.


Kubernetes

In this section, we will install essential tools for Kubernetes, such as Kubectl and Minikube. But first, let's take a brief overview of what Kubernetes is.

Kubernetes is an open-source container orchestration system that automates software deployment, scaling, and management. Originally designed by Google, the project is now maintained by the Cloud Native Computing Foundation.

Let's begin by installing both of these tools.

Kubectl

Kubectl is a command-line tool that facilitates communication with a Kubernetes cluster's control plane by utilizing the Kubernetes API.

Installation

  • Download the latest release of Kubectl using this command:

      curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
    
  • Validate the binary(optional):

    Download the Kubectl checksum file:

      curl -LO "https://dl.k8s.io/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl.sha256"
    

    Validate the kubectl binary against the checksum file:

      echo "$(cat kubectl.sha256)  kubectl" | sha256sum --check
    

    If the validation is successful, the output will be:

If the check fails, sha256 exits with nonzero status and prints output similar to:

kubectl: failed

sha256sum: WARNING: 1 computed checksum did NOT match

If you get this error that means you've to download a different version of the binary or checksum file.

  • Install Kubectl

      sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
    
  • To ensure the version you installed is up-to-date:

      kubectl version --client
    

    Or use this for a detailed view of the version:

      kubectl version --client --output=yaml
    

Minikube

Minikube is a local Kubernetes solution, designed to simplify learning and development for Kubernetes.

Installation

  • First, you need to check your Linux architecture. To do so, enter the command below:

      uname -m
    

If the output is x86_64, which indicates a 64-bit system, you can proceed with the following step. However, if your Linux architecture is ARM64 or ARM7, etc., please refer to this link.

  • To install the latest minikube stable release on x86-64 Linux using binary download:

      curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
    
      sudo install minikube-linux-amd64 /usr/local/bin/minikube
    
  • Start your cluster from the terminal:

      minikube start
    

    If you encounter any errors, refer to the driver documentation to configure the virtual machine (VM) or containers.

Now let's verify whether kubectl is configured or not for this type:

kubectl cluster-info

You'll get the response like:

If not restart your Minikube cluster using minikube delete and then typing minikube start to solve the issue.

Conclusion

In conclusion, installing Docker, Minikube, and Kubectl is essential for any DevOps engineer who wants to develop, test, and deploy applications efficiently. Docker provides a standardized way to package and distribute software, while Minikube and Kubectl enable developers to manage and orchestrate containers within a Kubernetes environment.

By following the steps outlined in this blog post, you can set up a powerful DevOps environment on your local machine, allowing you to streamline your development process and increase your productivity. Whether you are new to DevOps or an experienced practitioner, mastering these tools is a crucial step in becoming a proficient and effective DevOps engineer.


Feel free to connect with me on Twitter and LinkedIn to stay updated on my latest blog posts and professional endeavors!