Skip to content

Instantly share code, notes, and snippets.

@vnugent
Last active October 26, 2018 14:48
Show Gist options
  • Save vnugent/7265892ac9563fe835d3d9f98db25900 to your computer and use it in GitHub Desktop.
Save vnugent/7265892ac9563fe835d3d9f98db25900 to your computer and use it in GitHub Desktop.
Istio with minikube

Install Notes for Minikube, Istio and Kiali via Helm on Fedora 28

Use this link for 1.1 release https://preliminary.istio.io/

Step 0

Follow official docs to install kvm2, libvirtd, kubectl and helm

Step 1

Start minikube.

Note: Official docs have additional params for cert files. What they didn't tell you is those files must already exist on your system (took me several hours to figure that out :)

minikube start --memory=8192 --cpus=4 --kubernetes-version=v1.10.0 --vm-driver=kvm2

minikube addons enable ingress

If you are new to Kubernetes and mnikube, try to deploy a simple app such as this one to verify your cluster is fully functional.

Step 2

Initial set up

Manually create the namespace for istio

# Helm will create istio-system namespace for you in the next step, but it doesn't 
# create Kiali secret. Without the secret Kiali install will fail
kubectl create namespace istio-system

# create login credential for Kiali (admin/admin)
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Secret
metadata:
  name: kiali
  namespace: istio-system
  labels:
    app: kiali
type: Opaque
data:
  username: YWRtaW4=
  passphrase: YWRtaW4=
EOF

Step 3

At this point you should clone istio/istio repo to your local drive

Note: As of October 2018 there are two options for installing Istio. In this example I'm going with option #2 (Install with Helm and Tiller via Helm install)

kubectl apply -f install/kubernetes/helm/helm-service-account.yaml

helm init --service-account tiller

helm install install/kubernetes/helm/istio --name istio --namespace istio-system --set kiali.enabled=true --set gateways.istio-ingressgateway.type=NodePort

Step 4

How to access Kiali via ingress gateway

export GATEWAY_URL=$(minikube ip)
export KIALI_URL="http://$(echo $GATEWAY_URL | sed -e s/:.*//):$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="http-kiali")].nodePort}')"

echo $KIALI_URL

Troubleshooting Tips

Clean up

If you have problem starting up minikube try to clean up your VM using a combination of the following:

minikube stop
minikube delete
rm -rf ~/.kube
rm -rf ~/.minikube

Move your laptop between home and work?

If you ever switch WIFI such as moving between work and home you should clean up minikube env (see Clean up above)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment