Skip to content

Installing required tools

Introduction

This section will show you how to install the required tools needed to complete this guide. You will focus on most popular tools used in the Kubernetes world. You will also install additional programs used for interacting with the DigitalOcean API, and local development enablement.

Below is a complete list of the tools used in this guide:

  1. Kubectl - this the official Kubernetes client. Allows you to interact with the Kubernetes API, and to run commands against Kubernetes clusters.
  2. Helm - this is the package manager for Kubernetes. Behaves the same way as package managers used in Linux distributions, but for Kubernetes. Gained a lot of popularity, and it is a widely adopted solution for managing software packages installation and upgrade in Kubernetes.
  3. Doctl - allows you to interact with the DigitalOcean API via the command line. It supports most functionality found in the control panel. You can create, configure, and destroy DigitalOcean resources like Droplets, Kubernetes clusters, firewalls, load balancers, database clusters, domains, and more.
  4. Docker Desktop - enables you to build and share containerized applications and microservices using Docker. It has a GUI interface, and bundles a ready to run Kubernetes cluster to use for local development.
  5. Kustomize - Kustomize lets you customize raw, template-free YAML files for multiple purposes, leaving the original YAML untouched and usable as is.
  6. Tilt - eases local development by taking away the pain of time consuming Docker builds, watching files, and bringing environments up to date.

Prerequisites

To complete this section, you will need:

  1. Homebrew if you are using a macOS system.
  2. Curl package installed on your system.

Installing Docker Desktop

Depending on your operating system, you can install docker-desktop in the following ways:

  1. Install docker-desktop using Homebrew:

    brew install --cask docker
    
  2. Test to ensure you installed the latest version:

    docker version
    
  1. Update apt package index:

    sudo apt-get update
    sudo apt-get install \
        ca-certificates \
        curl \
        gnupg \
        lsb-release
    
  2. Add Docker's official GPG key:

    sudo mkdir -p /etc/apt/keyrings
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
    
  3. Set up the repository:

    echo \
    "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
    $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
    
  4. Install docker desktop:

    sudo apt install docker-desktop
    
  5. Test to ensure you installed the latest version:

    docker version
    

Installing Doctl

Depending on your operating system, you can install doctl in the following ways:

  1. Install doctl using Homebrew:

    brew install doctl
    
  2. Test to ensure you installed the latest version:

    doctl version
    
  1. Download the latest doctl package (check releases page):

    curl -LO https://github.com/digitalocean/doctl/releases/download/v1.79.0/doctl-1.79.0-linux-amd64.tar.gz
    
  2. Extract the doctl package:

    tar xf doctl-1.79.0-linux-amd64.tar.gz
    
  3. Set the executable flag, and make the doctl binary available in your path:

    chmod +x doctl
    sudo mv doctl /usr/local/bin
    
  4. Test to ensure you installed the latest version:

    doctl version
    

Installing Kubectl

Depending on your operating system, you can install kubectl in the following ways:

  1. Install kubectl using Homebrew:

    brew install kubectl
    
  2. Test to ensure you installed the latest version:

    kubectl version --client
    
  1. Download the latest kubectl release:

    curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
    
  2. Set the executable flag, and make the kubectl binary available in your path:

    chmod +x kubectl
    sudo mv kubectl /usr/local/bin
    
  3. Test to ensure you installed the latest version:

    kubectl version --client
    

Installing Helm

Depending on your operating system, you can install helm in the following ways:

  1. Install helm using Homebrew:

    brew install helm
    
  2. Test to ensure you installed the latest version:

    helm version
    
  1. Download the latest helm release:

    curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | sudo tee /usr/share/keyrings/helm.gpg > /dev/null
    sudo apt-get install apt-transport-https --yes
    echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/helm.gpg] https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list
    sudo apt-get update
    sudo apt-get install helm
    
  2. Test to ensure you installed the latest version:

    helm version
    

Installing Kustomize

Depending on your operating system, you can install kustomize in the following ways:

  1. Install kustomize using Homebrew:

    brew install kustomize
    
  2. Test to ensure you installed the latest version:

    kustomize version 
    
  1. Install kustomize by running the following script:

    curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"  | bash
    
  2. Test to ensure you installed the latest version:

    kustomize version
    

Installing Tilt

Depending on your operating system, you can install Tilt in the following ways:

  1. Install tilt using curl:

    brew install tilt
    
  2. Test to ensure you installed the latest version:

    tilt version
    
  1. Install tilt using curl:

    curl -fsSL https://raw.githubusercontent.com/tilt-dev/tilt/master/scripts/install.sh | bash
    
  2. Test to ensure you installed the latest version:

    tilt version
    

Installing Cloud Native Buildpacks's CLI (Optional)

Note

Installing the pack CLI is only needed if you wish to build and push the docker images of the microservices-demo app using Cloud Native Buildpacks as explained in preparing the demo application section.

Depending on your operating system, you can install pack in the following ways:

  1. Install pack using homebrew:

    brew install buildpacks/tap/pack
    
  2. Test to ensure you installed the latest version:

    pack version
    
  1. Install pack using curl:

    sudo add-apt-repository ppa:cncf-buildpacks/pack-cli
    sudo apt-get update
    sudo apt-get install pack-cli
    
  2. Test to ensure you installed the latest version:

    pack version
    

Next, you will learn how to authenticate with the DigitalOcean API to get the most out of the tools used in this guide to provision required cloud resources.