diff --git a/install/pre-install-payload/Dockerfile b/install/pre-install-payload/Dockerfile index b5560d05..401f3058 100644 --- a/install/pre-install-payload/Dockerfile +++ b/install/pre-install-payload/Dockerfile @@ -78,12 +78,12 @@ RUN mkdir -p ${NODE_DESTINATION}/bin && \ FROM base as kubectl-binary-downloader ARG ARCH -ARG KUBECTL_VERSION=v1.26.0 +ARG KUBECTL_VERSION=v1.30.1 RUN \ apk --no-cache add curl && \ - curl -fL --progress-bar -o /usr/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/${ARCH}/kubectl && \ - chmod +x /usr/bin/kubectl + curl -fL --progress-bar https://dl.k8s.io/${KUBECTL_VERSION}/kubernetes-client-linux-${ARCH}.tar.gz | \ + tar -C /usr/bin/ -x -z --strip-components 3 #### Final image diff --git a/tests/e2e/ansible/group_vars/all b/tests/e2e/ansible/group_vars/all index c53d87d6..3a786520 100644 --- a/tests/e2e/ansible/group_vars/all +++ b/tests/e2e/ansible/group_vars/all @@ -26,7 +26,7 @@ kubeadm_pkgs: centos: - conntrack - socat -k8s_version: v1.24.0 +k8s_version: v1.30.1 test_pkgs: ubuntu: - jq diff --git a/tests/e2e/ansible/install_containerd.yaml b/tests/e2e/ansible/install_containerd.yaml index 5ea9ee1b..1cbfcae4 100644 --- a/tests/e2e/ansible/install_containerd.yaml +++ b/tests/e2e/ansible/install_containerd.yaml @@ -28,7 +28,7 @@ - name: Re-create containerd config shell: | mkdir -p /etc/containerd/ - containerd config default > /etc/containerd/config.toml + containerd config default | sed -e 's/\(SystemdCgroup =\).*/\1 true/g' | tee /etc/containerd/config.toml args: executable: /bin/bash - name: Restart containerd service diff --git a/tests/e2e/ansible/install_kubeadm.yaml b/tests/e2e/ansible/install_kubeadm.yaml index b8dca6e8..e0e4975e 100644 --- a/tests/e2e/ansible/install_kubeadm.yaml +++ b/tests/e2e/ansible/install_kubeadm.yaml @@ -10,16 +10,15 @@ become: yes vars: cni_home: "/opt/cni" - cni_version: "v1.1.1" + cni_version: "v1.5.1" flannel_home: "/opt/flannel" - flannel_version: "v0.19.1" + flannel_version: "v0.25.6" kubeadm_cri_runtime_socket: "/run/containerd/containerd.sock" kubeadm_conf_dir: "/etc/kubeadm" kubelet_bin: "/usr/local/bin/kubelet" kubelet_service_dir: "/etc/systemd/system/kubelet.service.d" kubelet_service_file: "/etc/systemd/system/kubelet.service" - # Use 'cgroupfs' with containerd, 'systemd' with crio? - kubelet_cgroup_driver: "cgroupfs" + kubelet_cgroup_driver: "systemd" tasks: - name: Install kubeadm required packages package: @@ -53,17 +52,23 @@ creates: /usr/local/bin/crictl dest: /usr/local/bin remote_src: yes - - name: Install kube binaries + - name: Download kube binaries get_url: - url: https://storage.googleapis.com/kubernetes-release/release/{{ k8s_version }}/bin/linux/{{ target_arch }}/{{ item }} - dest: /usr/local/bin - mode: '+x' + url: https://dl.k8s.io/{{ k8s_version }}/kubernetes-node-linux-{{ target_arch }}.tar.gz + dest: /tmp/kubernetes-node-linux.tar.gz retries: 3 delay: 10 - with_items: - - kubeadm - - kubelet - - kubectl + - name: Unpack kube binaries + unarchive: + src: /tmp/kubernetes-node-linux.tar.gz + dest: /tmp/ + remote_src: yes + - name: Copy kube binaries + ansible.builtin.copy: + src: /tmp/kubernetes/node/bin/ + dest: /usr/local/bin/ + remote_src: yes + mode: preserve - name: Remove zram-generator-defaults in Fedora ansible.builtin.yum: name: zram-generator-defaults @@ -162,6 +167,9 @@ - kubeadm - kubectl - kubelet + - kube-log-runner + - kubectl-convert + - kube-proxy - name: Uninstall cni file: path: "{{ cni_home }}" diff --git a/tests/e2e/ansible/templates/kubeadm.conf.j2 b/tests/e2e/ansible/templates/kubeadm.conf.j2 index e91dafed..e506c57f 100644 --- a/tests/e2e/ansible/templates/kubeadm.conf.j2 +++ b/tests/e2e/ansible/templates/kubeadm.conf.j2 @@ -1,15 +1,6 @@ # Copied and modified from https://github.com/kata-containers/tests/blob/main/integration/kubernetes/kubeadm/config.yaml # apiVersion: kubeadm.k8s.io/v1beta3 -kind: InitConfiguration -nodeRegistration: - criSocket: unix://{{ kubeadm_cri_runtime_socket }} - imagePullPolicy: IfNotPresent - kubeletExtraArgs: - allowed-unsafe-sysctls: kernel.msg*,kernel.shm.*,net.* - v: "4" ---- -apiVersion: kubeadm.k8s.io/v1beta3 kind: ClusterConfiguration kubernetesVersion: {{ k8s_version }} networking: @@ -17,19 +8,12 @@ networking: podSubnet: 10.244.0.0/16 serviceSubnet: 10.96.0.0/12 apiServer: - extraArgs: - feature-gates: PodOverhead=true timeoutForControlPlane: 4m0s -imageRepository: k8s.gcr.io -scheduler: - extraArgs: - feature-gates: PodOverhead=true +imageRepository: registry.k8s.io --- apiVersion: kubelet.config.k8s.io/v1beta1 kind: KubeletConfiguration cgroupDriver: {{ kubelet_cgroup_driver }} -featureGates: - PodOverhead: true systemReserved: cpu: 500m memory: 256Mi diff --git a/tests/e2e/cluster/up.sh b/tests/e2e/cluster/up.sh index e6cc4d74..35d4a1f6 100755 --- a/tests/e2e/cluster/up.sh +++ b/tests/e2e/cluster/up.sh @@ -58,7 +58,7 @@ main() { # Untaint the node so that pods can be scheduled on it. for role in master control-plane; do kubectl taint nodes "$SAFE_HOST_NAME" \ - "node-role.kubernetes.io/$role:NoSchedule-" + "node-role.kubernetes.io/$role:NoSchedule-" || true done kubectl label node "$SAFE_HOST_NAME" node.kubernetes.io/worker=