kubekey icon indicating copy to clipboard operation
kubekey copied to clipboard

feat: add master and worker nodes upgrade cmd

Open 77yu77 opened this issue 1 year ago • 3 comments

What type of PR is this?

/kind feature

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #1429

Special notes for reviewers:

I change the getAllnodesK8sVersion of precheck modules, which just use in upgrade phase run. I can't confirm it have no problem.

Does this PR introduced a user-facing change?

It provide user to use  "upgrade phase master " to upgrade master node as one step of the upgrade phase run. 
It provide user to use  "upgrade phase workers " to upgrade worker nodes  as one step of the upgrade phase run. 

Additional documentation, usage docs, etc.:

Usage:
  kk upgrade phase master [flags]

Flags:
      --debug                    Print detailed information
      --download-cmd string      The user defined command to download the necessary binary files. The first param '%s' is output path, the second param '%s', is the URL (default "curl -L -o %s %s")
  -f, --filename string          Path to a configuration file
  -h, --help                     help for master
      --ignore-err               Ignore the error message, remove the host which reported error and force to continue
      --in-cluster               Running inside the cluster
      --namespace string         KubeKey namespace to use (default "kubekey-system")
      --with-kubernetes string   Specify a supported version of kubernetes


Usage:
  kk upgrade phase workers [flags]

Flags:
      --debug                    Print detailed information
      --download-cmd string      The user defined command to download the necessary binary files. The first param '%s' is output path, the second param '%s', is the URL (default "curl -L -o %s %s")
  -f, --filename string          Path to a configuration file
  -h, --help                     help for workers
      --ignore-err               Ignore the error message, remove the host which reported error and force to continue
      --in-cluster               Running inside the cluster
      --namespace string         KubeKey namespace to use (default "kubekey-system")
      --with-kubernetes string   Specify a supported version of kubernetes

77yu77 avatar Aug 09 '22 11:08 77yu77

test pictures(upgrade k8s from v1.23.6 to v1.23.8) 1 image

77yu77 avatar Aug 09 '22 11:08 77yu77

/assign @24sama

77yu77 avatar Aug 09 '22 11:08 77yu77

/lgtm /approve

24sama avatar Aug 13 '22 14:08 24sama

LGTM label has been added.

Git tree hash: 7f2173c81a4327d5a14b17af10e856eac00198ad

ks-ci-bot avatar Aug 13 '22 14:08 ks-ci-bot

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 24sama, 77yu77

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

ks-ci-bot avatar Aug 13 '22 14:08 ks-ci-bot

@all-contributors please add @77yu77 for code

pixiake avatar Aug 15 '22 09:08 pixiake

@pixiake

I've put up a pull request to add @77yu77! :tada:

allcontributors[bot] avatar Aug 15 '22 09:08 allcontributors[bot]