This repository was archived by the owner on Aug 12, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 48
48
- apt-key fingerprint 0EBFCD88
49
49
- add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
50
50
- apt-get update -y
51
- - apt-get install -y ca-certificates socat jq ebtables apt-transport-https cloud-utils prips docker-ce docker-ce-cli containerd.io kubelet kubeadm kubectl
51
+ - TRIMMED_KUBERNETES_VERSION=$(echo $KUBERNETES_VERSION | sed 's/\./\\./g' | sed 's/^v//')
52
+ - RESOLVED_KUBERNETES_VERSION=$(apt-cache policy kubelet | awk -v "VERSION=${TRIMMED_KUBERNETES_VERSION}" '$1~ VERSION { print $1 }' | head -n1)
53
+ - apt-get install -y ca-certificates socat jq ebtables apt-transport-https cloud-utils prips docker-ce docker-ce-cli containerd.io kubelet=${RESOLVED_KUBERNETES_VERSION} kubeadm=${RESOLVED_KUBERNETES_VERSION} kubectl=${RESOLVED_KUBERNETES_VERSION}
52
54
- systemctl daemon-reload
53
55
- systemctl enable docker
54
56
- systemctl start docker
@@ -160,7 +162,9 @@ spec:
160
162
- apt-key fingerprint 0EBFCD88
161
163
- add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
162
164
- apt-get update -y
163
- - apt-get install -y ca-certificates socat jq ebtables apt-transport-https cloud-utils prips docker-ce docker-ce-cli containerd.io kubelet kubeadm kubectl
165
+ - TRIMMED_KUBERNETES_VERSION=$(echo $KUBERNETES_VERSION | sed 's/\./\\./g' | sed 's/^v//')
166
+ - RESOLVED_KUBERNETES_VERSION=$(apt-cache policy kubelet | awk -v "VERSION=${TRIMMED_KUBERNETES_VERSION}" '$1~ VERSION { print $1 }' | head -n1)
167
+ - apt-get install -y ca-certificates socat jq ebtables apt-transport-https cloud-utils prips docker-ce docker-ce-cli containerd.io kubelet=${RESOLVED_KUBERNETES_VERSION} kubeadm=${RESOLVED_KUBERNETES_VERSION} kubectl=${RESOLVED_KUBERNETES_VERSION}
164
168
- systemctl daemon-reload
165
169
- systemctl enable docker
166
170
- systemctl start docker
You can’t perform that action at this time.
0 commit comments