Skip to content

fix: Offline install #2611

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 11, 2025
Merged

Conversation

redscholar
Copy link
Collaborator

@redscholar redscholar commented Jun 11, 2025

What type of PR is this?

What this PR does / why we need it:

  1. the inventory like:
apiVersion: kubekey.kubesphere.io/v1
kind: Inventory
metadata:
  name: default
spec:
  hosts:
    i-bi3mb19w:
      connector:
        host: 172.16.0.2
      internal_ipv4: 172.16.0.2
    i-ntnxgrer:
      connector:
        host: 172.16.0.3
      internal_ipv4: 172.16.0.3
    i-xcg3bb1u:
      connector:
        host: 172.16.0.4
      internal_ipv4: 172.16.0.4
  groups:
    image_registry:
      hosts:
        - i-bi3mb19w
    etcd:
      hosts:
        - i-bi3mb19w
    k8s_cluster:
      groups:
        - kube_control_plane
        - kube_worker
    kube_control_plane:
      hosts:
        - i-bi3mb19w
          #- i-ntnxgrer
          #- i-xcg3bb1u
    kube_worker:
      hosts:
        - i-bi3mb19w
        - i-ntnxgrer
        - i-xcg3bb1u

the config file like:

apiVersion: kubekey.kubesphere.io/v1
kind: Config
spec:
  # zone for kk. how to download files
  #  kkzone: cn
  # work_dir is the directory where the artifact is extracted.
  #  work_dir: /var/lib/kubekey/
  # the version of kubernetes to be installed.
  # should be greater than or equal to kube_version_min_required.
  kube_version: v1.31.2
  # helm binary
  helm_version: v3.16.4
  # etcd binary
  etcd_version: v3.5.16
  # ========== image registry ==========
  # keepalived image tag. Used for load balancing when there are multiple image registry nodes.
  # keepalived_version: stable
  # ========== image registry: harbor ==========
  # harbor image tag
  harbor_version: v2.10.1
  # docker-compose binary
  dockercompose_version: v2.24.6
  # ========== image registry: registry ==========
  # registry image tag
  # registry_version: 2.8.3
  # ========== cri ==========
  # crictl binary
  crictl_version: v1.31.1
  # ========== cri: docker ==========
  # docker binary
  docker_version: 27.3.1
  # cridockerd. Required when kube_version is greater than 1.24
  # cridockerd_version: v0.3.15
  # ========== cri: containerd ==========
  # containerd binary
  containerd_version: v1.7.24
  # runc binary
  runc_version: v1.2.3
  # ========== cni ==========
  # cni_plugins binary
  # cni_plugins_version: v1.5.1
  # ========== cni: calico ==========
  # calicoctl binary
  calico_version: v3.29.2
  # ========== cni: cilium ==========
  # cilium helm
  # cilium_version: 1.16.0
  # ========== cni: kubeovn ==========
  # kubeovn helm
  # kubeovn_version: 0.1.0
  # ========== cni: hybridnet ==========
  # hybridnet helm
  # hybridnet_version: 0.6.8
  # ========== storageclass ==========
  # ========== storageclass: nfs ==========
  # nfs provisioner helm version
  # nfs_provisioner_version: 4.0.18
  kubernetes: 
    controller_manager:
      extra_args:
        cluster-signing-duration: 87600h
  cri:
    sandbox_image:
      tag: "3.10"
    # support: containerd,docker
    container_manager: containerd
  
  image_manifests:
   - docker.io/calico/apiserver:v3.29.2
   - docker.io/calico/cni:v3.29.2
   - docker.io/calico/csi:v3.29.2
   - docker.io/calico/kube-controllers:v3.29.2
   - docker.io/calico/node-driver-registrar:v3.29.2
   - docker.io/calico/node:v3.29.2
   - docker.io/calico/pod2daemon-flexvol:v3.29.2
   - docker.io/kubesphere/k8s-dns-node-cache:1.22.20
   - docker.io/openebs/provisioner-localpv:3.3.0
   - docker.io/coredns/coredns:1.8.6
   - docker.io/kubesphere/kube-apiserver:v1.31.2
   - docker.io/kubesphere/kube-controller-manager:v1.31.2
   - docker.io/kubesphere/kube-proxy:v1.31.2
   - docker.io/kubesphere/kube-scheduler:v1.31.2
   - docker.io/kubesphere/pause:3.10
   - quay.io/tigera/operator:v1.36.5
   - docker.io/kubesphere/pause:3.1
   - docker.io/calico/ctl:v3.29.2
   - docker.io/calico/typha:v3.29.2  
   - docker.io/calico/apiserver:v3.29.2
   - docker.io/calico/kube-controllers:v3.29.2
   - docker.io/calico/node:v3.29.2
   - docker.io/calico/pod2daemon-flexvol:v3.29.2
   - docker.io/calico/cni:v3.29.2
   - docker.io/calico/node-driver-registrar:v3.29.2
   - docker.io/calico/csi:v3.29.2
 
  global_registry: 172.16.0.2

the harbor will install in 172.16.0.2. and all images will pull in this harbor.
test results:
image
image

Which issue(s) this PR fixes:

Fixes #

Special notes for reviewers:

Does this PR introduced a user-facing change?

Offline install

Additional documentation, usage docs, etc.:


Signed-off-by: joyceliu <[email protected]>
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: redscholar

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubesphere-prow kubesphere-prow bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 11, 2025
Copy link

@pixiake
Copy link
Collaborator

pixiake commented Jun 11, 2025

/lgtm

@kubesphere-prow kubesphere-prow bot added the lgtm Indicates that a PR is ready to be merged. label Jun 11, 2025
Copy link

LGTM label has been added.

Git tree hash: 2896484e589030d9b356b6b8db0fbe9d4d0a5e15

@kubesphere-prow kubesphere-prow bot merged commit e109fbb into kubesphere:feature-gitops Jun 11, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. release-note size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants