Verify Virtlet after deployment

Verify Virtlet after deploymentΒΆ

After you enable Virtlet as described in Deploy Virtlet, proceed with the verification procedure described in this section.

To verify Virtlet after deployment:

  1. Verify a basic pod startup:

    1. 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
      
    2. 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.

  2. Verify SSH access to the VM pod:

    1. 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.

    2. Access the VM pod using the vmssh.sh script:

      ./vmssh.sh cirros@cirros-vm
      
  3. Verify whether the VM can access the Kubernetes cluster services:

    1. Verify the DNS resolution of the cluster services:

      nslookup kubernetes.default.svc.cluster.local
      
    2. Verify the service connectivity:

      curl -k https://kubernetes.default.svc.cluster.local
      

      Note

      The above command will raise an authentication error. Ignore this error.

    3. Verify Internet access from the VM. For example:

      curl -k https://google.com
      ping -c 1 8.8.8.8