This commit is contained in:
ansgarz 2021-12-08 11:39:58 +01:00
parent 214f5bc530
commit c5199d9750

View file

@ -13,8 +13,12 @@ docker ps
#export timeout=30; while [ ! -f /var/lib/docker/volumes/k3s-server/_data/server/kubeconfig.yaml ]; do if [ "$timeout" == 0 ]; then echo "ERROR: Timeout while waiting for file."; docker ps -a; ls /var/lib/docker/volumes/k3s-server/_data/; break; fi; sleep 1; ((timeout--)); done #export timeout=30; while [ ! -f /var/lib/docker/volumes/k3s-server/_data/server/kubeconfig.yaml ]; do if [ "$timeout" == 0 ]; then echo "ERROR: Timeout while waiting for file."; docker ps -a; ls /var/lib/docker/volumes/k3s-server/_data/; break; fi; sleep 1; ((timeout--)); done
sleep 60 sleep 60
docker cp $name:/var/lib/rancher/k3s/server/kubeconfig.yaml /var/lib/docker/volumes/k3s-server/_data/server/ mkdir -p $HOME/.kube/
ls /var/lib/docker/volumes/k3s-server/_data/server/
docker cp $name:/var/lib/rancher/k3s/server/kubeconfig.yaml $HOME/.kube/config
#docker cp $name:/var/lib/rancher/k3s/server/kubeconfig.yaml /var/lib/docker/volumes/k3s-server/_data/server/
#ls /var/lib/docker/volumes/k3s-server/_data/server/
if [ "$timeout" == 0 ] if [ "$timeout" == 0 ]
then then
@ -26,8 +30,8 @@ then
exit -1 exit -1
fi fi
mkdir -p $HOME/.kube/
cp /var/lib/docker/volumes/k3s-server/_data/server/kubeconfig.yaml $HOME/.kube/config #cp /var/lib/docker/volumes/k3s-server/_data/server/kubeconfig.yaml $HOME/.kube/config
apk add wget curl bash sudo openjdk8 apk add wget curl bash sudo openjdk8
wget -P /etc/apk/keys/ https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub wget -P /etc/apk/keys/ https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub