After you enable Virtlet as described in Deploy Virtlet, proceed with the verification procedure described in this section.
To verify Virtlet after deployment:
Verify a basic pod startup:
Start a sample VM:
kubectl create -f https://raw.githubusercontent.com/Mirantis/virtlet/v1.4.4/examples/cirros-vm.yaml
kubectl get pods --all-namespaces -o wide -w
Connect to the VM console:
kubectl attach -it cirros-vm
If you do not see a command prompt, press Enter
.
Example of system response:
login as 'cirros' user. default password: 'gosubsgo'. use 'sudo' for root.
cirros-vm login: cirros
Password:
$
To quit the console, use the ^]
key combination.
Verify SSH access to the VM pod:
Download the vmssh.sh
script with the test SSH key:
wget https://raw.githubusercontent.com/Mirantis/virtlet/v1.4.4/examples/{vmssh.sh,vmkey}
chmod +x vmssh.sh
chmod 600 vmkey
Note
The vmssh.sh
script requires kubectl
to access a
cluster.
Access the VM pod using the vmssh.sh
script:
./vmssh.sh cirros@cirros-vm
Verify whether the VM can access the Kubernetes cluster services:
Verify the DNS resolution of the cluster services:
nslookup kubernetes.default.svc.cluster.local
Verify the service connectivity:
curl -k https://kubernetes.default.svc.cluster.local
Note
The above command will raise an authentication error. Ignore this error.
Verify Internet access from the VM. For example:
curl -k https://google.com
ping -c 1 8.8.8.8