summaryrefslogtreecommitdiffstats
path: root/src/vagrant/kubeadm/virtlet/virtlet.sh
blob: 4ed527eb88e2059048078e871fb0b8da95854b06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash

set -ex

kubectl label node worker1 extraRuntime=virtlet
kubectl label node worker2 extraRuntime=virtlet
kubectl create configmap -n kube-system virtlet-config --from-literal=download_protocol=http --from-literal=image_regexp_translation=1 --from-literal=disable_kvm=y
kubectl create configmap -n kube-system virtlet-image-translations --from-file /vagrant/virtlet/images.yaml
kubectl create -f /vagrant/virtlet/virtlet-ds.yaml

kubectl delete pod --all
kubectl create -f /vagrant/virtlet/cirros-vm.yaml
r="0"
while [ $r -ne "1" ]
do
   r=$(kubectl get pods cirros-vm | grep Running | wc -l)
   sleep 60
done
sleep 360
kubectl get pods cirros-vm -o custom-columns=:.status.podIP | xargs ping -c 4
echo 'login by user:cirros & password:gocubsgo'