Kubernetes and Istio Setup in VirtualBox

Prerequisites

Download the folllowing files for Kubernetes and Istio setup:

  • Oracle VM VirtualBox
  • k8s-base.ova (Base Kubernetes image)
  • istio-integrated.ova (Pre-configured Istio image)
  • istio-1.11.1-linux-amd64.tar.gz
  • kube-flannel.yaml

Virtual Machine Setup

Import the base Kbuernetes OVA file into VirtualBox:

  1. Launch VirtualBox and select File → Import Appliance
  2. Choose the k8s-base.ova file
  3. Configure NAT networking in VirtualBox: ``` VirtualBox → Preferences → Network → NAT Networks Create new NAT network with default settings
  4. Start the imported virtual machine

Kubernetes Component Verification

After accessing the VM via SSH (IP: 192.168.56.5, credentials: root/123456), verify component status:

kubectl get componentstatus

If components show errors, reset the environment:

kubeadm reset
ifconfig cni0 down && ip link delete cni0
ifconfig flannel.1 down && ip link delete flannel.1
rm -rf /var/lib/cni/ /etc/kubernetes /root/.kube/config /var/lib/etcd

Reinitialize Kubernetes:

kubeadm init \
--image-repository registry.aliyuncs.com/google_containers \
--kubernetes-version=v1.21.5 \
--pod-network-cidr=10.10.0.0/16 \
--service-cidr=10.20.0.0/16 \
--apiserver-advertise-address=192.168.56.5

Configure kubectl:

mkdir -p $HOME/.kube
cp /etc/kubernetes/admin.conf $HOME/.kube/config
chown $(id -u):$(id -g) $HOME/.kube/config

Istio Installation

Extract and configure Istio:

tar -zxvf istio-1.11.1-linux-amd64.tar.gz
echo 'export ISTIO_HOME=/root/istio-1.11.1/bin' >> /etc/profile
echo 'export PATH=$ISTIO_HOME:$PATH' >> /etc/profile
source /etc/profile

Install Istio:

istioctl install --set profile=demo -y

Troubleshooting

Verify Istio namespace:

kubectl get ns

Check pod status in istio-system namespace:

kubectl get pods -n istio-system

Allow scheduling on master node:

kubectl taint nodes $(kubectl get nodes -o jsonpath='{.items[0].metadata.name}') node-role.kubernetes.io/master-

Install Flannel network plugin:

kubectl apply -f kube-flannel.yaml

Verify Flannel installation:

kubectl get pods -n kube-flannel

Tags: kubernetes Istio VirtualBox Flannel ServiceMesh

Posted on Sun, 10 May 2026 06:14:30 +0000 by artic