Skip to content

Commit 2e9731f

Browse files
committed
Upgrade to get Kubernetes 1.16, enforcing use of apps/v1 instead of betas
1 parent 0a7b117 commit 2e9731f

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

bin/y-cluster-provision-k3s-multipass

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ export INSTALL_K3S_SKIP_START=true
3131
# For kubectl top to work with metrics-server, https://github.com/rancher/k3s/issues/252#issuecomment-482662774
3232
export INSTALL_K3S_EXEC="--kubelet-arg=address=0.0.0.0"
3333
34-
INSTALLER_REVISION=d8c4f3811e96d75f82bebc82f4ef8f82fbe70637
35-
export INSTALL_K3S_VERSION=v0.8.1
34+
INSTALLER_REVISION=e810ee1678dc59ed35970734e69a5b31b5773550
35+
export INSTALL_K3S_VERSION=v0.10.1-rc1
3636
curl -sfL https://github.com/rancher/k3s/raw/$INSTALLER_REVISION/install.sh | sh -
3737
3838
K3S_DATA_DIR=/var/lib/rancher/k3s
@@ -65,23 +65,14 @@ k3s crictl info
6565
6666
chmod a+r /etc/rancher/k3s/*
6767
68-
k3s kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/v0.0.9/deploy/local-path-storage.yaml
69-
cat << EOF | k3s kubectl create -f -
70-
kind: StorageClass
71-
apiVersion: storage.k8s.io/v1
72-
metadata:
73-
name: standard
74-
provisioner: rancher.io/local-path
75-
volumeBindingMode: WaitForFirstConsumer
76-
reclaimPolicy: Delete
77-
EOF
78-
k3s kubectl patch storageclass standard -p "{\"metadata\":{\"annotations\":{\"storageclass.kubernetes.io/is-default-class\":\"true\"}}}"
68+
# The default storage class with k3s >= 0.10 is "local-path"
69+
#k3s kubectl patch storageclass standard -p "{\"metadata\":{\"annotations\":{\"storageclass.kubernetes.io/is-default-class\":\"true\"}}}"
7970
k3s kubectl get node
8071
k3s kubectl wait --for=condition=Ready node/ystack-master
8172
';
8273

8374
multipass exec "$VM_NAME" -- sudo cat /etc/rancher/k3s/k3s.yaml \
84-
| sed "s|localhost|$K3S_NODEIP_MASTER|" \
75+
| sed "s|127.0.0.1|$K3S_NODEIP_MASTER|" \
8576
> "$KUBECONFIG.tmp"
8677

8778
KUBECONFIG="$KUBECONFIG.tmp" kubectl config rename-context default ystack-k3s

0 commit comments

Comments
 (0)