Ensure docker
, k3d
and istioctl
installed.
brew update
brew install --cask docker
brew install k3d istioctl
Versions in use:
$ docker version
Client:
Cloud integration: 1.0.14
Version: 20.10.6
Server: Docker Engine - Community
Engine:
Version: 20.10.6
API version: 1.41 (minimum version 1.12)
$ k3d version
k3d version v4.4.4
$ istioctl version
client version: 1.10.0
control plane version: 1.10.0
data plane version: 1.10.0 (8 proxies)
k3d cluster create bob --servers 1 --agents 3 \
--port 9443:443@loadbalancer \
--port 80:80@loadbalancer \
--port '32036:32036@server[0]' \
--api-port 6443 --k3s-server-arg '--no-deploy=traefik'
docker ps --format 'table {{.ID}}\t{{.Image}}\t{{.Names}}\t{{.Ports}}'
kubectl get nodes
kubectl get ns
kubectl get pods -A
kubectl get services -A
Istio install profiles.
Inspect profiles:
istioctl profile list # Will list available profiles
istioctl profile dump default # Will dump the default profile config
istioctl profile dump demo
Install demo profile:
istioctl install --set profile=demo -y
To enable the automatic injection of Envoy sidecar proxies, run the following: (Otherwise you will need to do this manually when you deploy your applications)
kubectl label namespace default istio-injection=enabled
Download and extract samples:
ISTIO_VERSION=1.10.0
ISTIO_URL=https://github.com/istio/istio/releases/download/$ISTIO_VERSION/istio-$ISTIO_VERSION-linux-amd64.tar.gz
curl -L $ISTIO_URL | tar xz
cd istio-$ISTIO_VERSION
kubectl apply -f samples/bookinfo/platform/kube/bookinfo.yaml
kubectl get services
kubectl get pods
kubectl exec "$(kubectl get pod -l app=ratings \
-o jsonpath='{.items[0].metadata.name}')" -c ratings \
-- curl -sS productpage:9080/productpage | grep -o "<title>.*</title>"
kubectl apply -f samples/bookinfo/networking/bookinfo-gateway.yaml
istioctl analyze
Open in browser:
open http://localhost/productpage
kubectl apply -f samples/addons
kubectl rollout status deployment/kiali -n istio-system
If there are errors trying to install the addons, try running the command again. There may be some timing issues which will be resolved when the command is run again.
istioctl dashboard kiali
for i in $(seq 1 100); do curl -so /dev/null http://localhost/productpage; done
Uninstall Istio:
kubectl delete -f samples/addons
kubectl delete -f samples/bookinfo/networking/bookinfo-gateway.yaml
kubectl delete -f samples/bookinfo/platform/kube/bookinfo.yaml
istioctl x uninstall --purge
kubectl delete namespace istio-system
kubectl label namespace default istio-injection-
Delete k3d/k3s cluster:
k3d cluster delete bob