diff --git a/docs/gpu-k8s-role.md b/docs/gpu-k8s-role.md index 6ae3ea5..4dd7299 100644 --- a/docs/gpu-k8s-role.md +++ b/docs/gpu-k8s-role.md @@ -12,7 +12,9 @@ The role performs four main tasks: 4. **Verify GPU access** by deploying the official NVIDIA device plugin and running a small CUDA workload. When `sealos_version` is set to `latest` (the default), the role automatically -fetches the most recent stable release from GitHub. +fetches the most recent stable release from GitHub. The Kubernetes image tag is +controlled separately via `kubernetes_version`, which defaults to `v1.25.16` but +can be overridden to any compatible release. The following command is used to create the cluster (example with one master and one worker): @@ -20,7 +22,7 @@ The following command is used to create the cluster (example with one master and ```bash REGISTRY=$(scripts/get_labring_registry.sh) sealos run \ - ${REGISTRY}/kubernetes: \ + ${REGISTRY}/kubernetes: \ ${REGISTRY}/cilium: \ ${REGISTRY}/helm: \ --masters 172.16.11.120 \ diff --git a/playbooks/roles/vhosts/gpu-k8s/defaults/main.yml b/playbooks/roles/vhosts/gpu-k8s/defaults/main.yml index 1a45798..dbd9fc2 100644 --- a/playbooks/roles/vhosts/gpu-k8s/defaults/main.yml +++ b/playbooks/roles/vhosts/gpu-k8s/defaults/main.yml @@ -1,5 +1,6 @@ # Default variables for gpu-k8s role sealos_version: latest +kubernetes_version: v1.25.16 cilium_version: v1.13.4 helm_version: v3.9.4 master_ips: [] # List of up to three master node IPs diff --git a/playbooks/roles/vhosts/gpu-k8s/tasks/install_cluster.yml b/playbooks/roles/vhosts/gpu-k8s/tasks/install_cluster.yml index ce39e83..21638bd 100644 --- a/playbooks/roles/vhosts/gpu-k8s/tasks/install_cluster.yml +++ b/playbooks/roles/vhosts/gpu-k8s/tasks/install_cluster.yml @@ -48,7 +48,7 @@ - name: Run sealos to create Kubernetes cluster shell: | sealos run \ - {{ labring_registry.stdout }}/kubernetes:{{ sealos_version }} \ + {{ labring_registry.stdout }}/kubernetes:{{ kubernetes_version }} \ {{ labring_registry.stdout }}/cilium:{{ cilium_version }} \ {{ labring_registry.stdout }}/helm:{{ helm_version }} \ --masters {{ master_ips | join(',') }} \