Last active
June 14, 2018 14:27
-
-
Save sboeuf/d84acfbaf2bccd528098d73a3b891cd1 to your computer and use it in GitHub Desktop.
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
# Taint the master node to allow pods to be scheduled | |
sudo -E kubectl taint nodes --all node-role.kubernetes.io/master- | |
# Remove CNI stuff to make sure kube-dns will start | |
rm -r /var/lib/cni/networks/* | |
# Restart the cluster | |
sudo kubeadm reset --cri-socket /var/run/crio/crio.sock | |
sudo systemctl stop kubelet | |
sudo systemctl stop crio | |
sudo pkill -9 qemu | |
sudo pkill -9 kata | |
sudo pkill -9 kube | |
sudo find /var/lib/containers/storage/overlay/ -path "*/merged" -exec umount {} \; | |
sudo find /run/kata-containers/shared/sandboxes/ -path "*/*-serviceaccount" -exec umount {} \; | |
sudo find /run/kata-containers/shared/sandboxes/ -path "*/*-proxy" -exec umount {} \; | |
sudo find /run/kata-containers/shared/sandboxes/ -path "*/*-termination-log" -exec umount {} \; | |
sudo find /run/kata-containers/shared/sandboxes/ -path "*/*-hosts" -exec umount {} \; | |
sudo find /run/kata-containers/shared/sandboxes/ -path "*/*-certs" -exec umount {} \; | |
sudo find /run/kata-containers/shared/sandboxes/ -path "*/*-hostname" -exec umount {} \; | |
sudo find /run/kata-containers/shared/sandboxes/ -path "*/*-resolv.conf" -exec umount {} \; | |
sudo find /run/kata-containers/shared/sandboxes/ -path "*/*-shm" -exec umount {} \; | |
sudo find /run/kata-containers/shared/sandboxes/ -path "*/*/rootfs" -exec umount {} \; | |
sudo find /run/containers/storage/overlay-containers/ -path "*/userdata/shm" -exec umount {} \; | |
sudo umount /run/netns/cni-* | |
sudo -E bash -c "rm -r /var/lib/containers/storage/overlay*/*" | |
sudo -E bash -c "rm -r /var/lib/cni/networks/*" | |
sudo -E bash -c "rm -r /var/run/kata-containers/*" | |
sudo systemctl daemon-reload | |
sudo systemctl restart crio | |
sudo systemctl restart kubelet | |
# Start k8s cluster | |
sudo kubeadm init --skip-preflight-checks --cri-socket /var/run/crio/crio.sock --pod-network-cidr=10.244.0.0/16 | |
sudo chown ${USER}:${USER} /etc/kubernetes/admin.conf | |
kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/v0.10.0/Documentation/kube-flannel.yml | |
kubectl taint nodes --all node-role.kubernetes.io/master- | |
# Start ISTIO | |
kubectl apply -f istio-0.8.0/install/kubernetes/istio-demo.yaml | |
kubectl apply -f bookinfo-inject-only-one-kata.yaml | |
./istio-0.8.0/bin/istioctl create -f istio-0.8.0/samples/bookinfo/routing/bookinfo-gateway.yaml | |
kubectl get pod --all-namespaces -o wide --show-labels | |
kubectl -n istio-system port-forward $(kubectl -n istio-system get pod -l app=servicegraph -o jsonpath='{.items[0].metadata.name}') 8088:8088 & | |
kubectl port-forward -n istio-system $(kubectl get pod -n istio-system -l app=jaeger -o jsonpath='{.items[0].metadata.name}') 16686:16686 & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment