Categories
Kubernetes

Kubernetes: Install Istio using Istioctl

General

https://istio.io/docs/setup/install/istioctl/

Install istioctl client

Option 1

brew install istioctl

Option 2

Download the latest Istio version from GitHub.

curl -L https://istio.io/downloadIstio | sh -
cd istio-1.6.1
sudo cp ./bin/istioctl /usr/local/bin/istioctl
sudo chmod +x /usr/local/bin/istioctl

Optional

Enable command-line completion within zshrc.

{
  mkdir -p ~/completions && istioctl collateral --zsh -o ~/completions
  source ~/completions/_istioctl
  echo "source ~/completions/_istioctl" >> ~/.zshrc
}

Verify before installation

istioctl verify-install

Download Istio

Download the latest Istio version from GitHub.

curl -L https://istio.io/downloadIstio | sh -

OR download a specific version.

curl -L https://git.io/getLatestIstio | ISTIO_VERSION=1.4.9 sh

Change directory into the Istio package directory.

cd istio-1.6.0

Export $PATH.

export PATH=$PWD/bin:$PATH

Install Istio

View profiles.

https://istio.io/docs/setup/additional-setup/config-profiles/

istioctl profile list

I will be installing profile default. If you don’t specify a profile, the default is used.

Note: SDS is enabled by default from Version 1.5 and above.

If you are installing a version below 1.5 and you want to enable SDS, use the following command.

istioctl manifest generate \
  --set values.gateways.istio-egressgateway.enabled=false \
  --set values.gateways.istio-ingressgateway.sds.enabled=true > \
  istio-ingressgateway.yaml && kubectl apply -f istio-ingressgateway.yaml

Otherwise, use the regular install command.

istioctl manifest apply --set profile=default

There are many other options. but I only wanted to write the basics in order to avoid confusion.

View that all pods are in a running state.

kubectl get pods -n istio-system
NAME READY STATUS RESTARTS AGE
istio-ingressgateway-5d64975b66-k4t9p 1/1 Running 0 11m
istiod-5997cbd67-npmv6 1/1 Running 0 11m
prometheus-7fb8c98b68-qfxqj 2/2 Running 0 11m

Verify after installation

Generate your manifest. Use the same options that you used during the initial installation.

istioctl manifest generate --set profile=default > istio-ingressgateway.yaml

Verify.

istioctl verify-install -f istio-ingressgateway.yaml

Overview

Get an overview of your mesh.

istioctl proxy-status

Example

istioctl proxy-status
NAME CDS LDS EDS RDS PILOT VERSION
istio-ingressgateway-5d64975b66-k4t9p.istio-system SYNCED SYNCED SYNCED NOT SENT istiod-5997cbd67-npmv6 1.6.0
prometheus-7fb8c98b68-qfxqj.istio-system SYNCED SYNCED SYNCED SYNCED istiod-5997cbd67-npmv6 1.6.0

Uninstall

istioctl manifest generate --set profile=default | kubectl delete -f -
Comments

By Tommy Elmesewdy

DevOps Engineer