Fix install_k3s_cluster.sh to configure docker private registry 44/14744/1
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Mon, 18 Nov 2024 11:58:29 +0000 (12:58 +0100)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Mon, 18 Nov 2024 11:58:39 +0000 (12:58 +0100)
Change-Id: I961cd4c4e4eaaeac4eb84cee2333bde67b958549
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
installers/install_k3s_cluster.sh

index 3fc0b4a..539e776 100755 (executable)
@@ -23,6 +23,7 @@ K8S_VERSION="v1.29.3+k3s1"
 function configure_registry() {
     if [ -n "${DOCKER_PROXY_URL}" ]; then
         echo "Configuring docker proxy URL in /etc/rancher/k3s/registries.yaml"
+        sudo mkdir -p /etc/rancher/k3s/
         cat << EOF | sudo tee /etc/rancher/k3s/registries.yaml > /dev/null
 mirrors:
   docker.io: