In this article, we will create an automated script to enable developers to work in Kubernetes and Istio environment. So basically once you run this script you will have a functional development environment set to get started with your development work.
This script is targeted towards developers using Mac and we will be using Homebrew – the package manager for macOS.
Homebrew is a free package manager for macOS and helps you to manage software in your Mac. You can install the software you need through command line in no time. There is no need to download DMG files and drag it to your applications folder. It makes the process of installing and uninstalling software so muck easier and faster.
Minikube is a tool which allows you to run a single-node Kubernetes cluster locally.
Kubectl is used for running commands to deploy and manage components against your Kubernetes instance.
The below script will install Homebrew, Minikube, Kubernetes Command Line Interface and Istio —
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Check for Homebrew and install if we don't have it | |
if test ! $(which brew); then | |
echo "Installing homebrew…" | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
fi | |
# Make sure we are using the latest Homebrew. | |
brew update | |
# Check for Minikube and install if we don't have it | |
echo "Installing Minikube to run a single-node Kubernetes Cluster locally…" | |
brew cask install minikube | |
echo "Minikube Installation Complete" | |
# Check for Kubernetes Command Line Utility and install if we don't have it | |
echo "Installing kubectl to manage components in your Kubernetes cluster…" | |
brew install kubectl | |
echo "kubectl Installation Complete" | |
# Install Istio | |
echo "Installation of Istio started…" | |
curl -L https://git.io/getLatestIstio | sh – | |
cd istio-0.7.1/ | |
export PATH=$PWD/bin:$PATH | |
kubectl apply -f install/kubernetes/istio.yaml | |
echo "Istio Installation Complete" |
Once you run the above script, it does all the required setup to get you up and running with your local K8s and Istio development —
Categories: Istio, Kubernetes
Leave a Reply