diff --git a/cmd/kubeadm/app/cmd/upgrade/plan.go b/cmd/kubeadm/app/cmd/upgrade/plan.go index 919b715b96e..a6a8dd62afc 100644 --- a/cmd/kubeadm/app/cmd/upgrade/plan.go +++ b/cmd/kubeadm/app/cmd/upgrade/plan.go @@ -108,7 +108,7 @@ func printAvailableUpgrades(upgrades []upgrade.Upgrade, w io.Writer, featureGate firstPrinted = true continue } - fmt.Fprintf(tabw, "\t\t%d x %s\t%s\n", nodeCount, oldVersion, upgrade.After.KubeVersion) + fmt.Fprintf(tabw, "\t%d x %s\t%s\n", nodeCount, oldVersion, upgrade.After.KubeVersion) } // We should flush the writer here at this stage; as the columns will now be of the right size, adjusted to the above content tabw.Flush() diff --git a/cmd/kubeadm/app/cmd/upgrade/plan_test.go b/cmd/kubeadm/app/cmd/upgrade/plan_test.go index ed9c7f93efb..c75df0780cf 100644 --- a/cmd/kubeadm/app/cmd/upgrade/plan_test.go +++ b/cmd/kubeadm/app/cmd/upgrade/plan_test.go @@ -330,6 +330,53 @@ Note: Before you can perform this upgrade, you have to update kubeadm to v1.9.0- _____________________________________________________________________ +`), + }, + { + upgrades: []upgrade.Upgrade{ + { + Description: "version in the v1.9 series", + Before: upgrade.ClusterState{ + KubeVersion: "v1.9.2", + KubeletVersions: map[string]uint16{ + "v1.9.2": 1, + "v1.9.3": 2, + }, + KubeadmVersion: "v1.9.2", + DNSVersion: "1.14.5", + EtcdVersion: "3.0.17", + }, + After: upgrade.ClusterState{ + KubeVersion: "v1.9.3", + KubeadmVersion: "v1.9.3", + DNSVersion: "1.14.8", + EtcdVersion: "3.1.12", + }, + }, + }, + expectedBytes: []byte(`Components that must be upgraded manually after you have upgraded the control plane with 'kubeadm upgrade apply': +COMPONENT CURRENT AVAILABLE +Kubelet 1 x v1.9.2 v1.9.3 + 2 x v1.9.3 v1.9.3 + +Upgrade to the latest version in the v1.9 series: + +COMPONENT CURRENT AVAILABLE +API Server v1.9.2 v1.9.3 +Controller Manager v1.9.2 v1.9.3 +Scheduler v1.9.2 v1.9.3 +Kube Proxy v1.9.2 v1.9.3 +Kube DNS 1.14.5 1.14.8 +Etcd 3.0.17 3.1.12 + +You can now apply the upgrade by executing the following command: + + kubeadm upgrade apply v1.9.3 + +Note: Before you can perform this upgrade, you have to update kubeadm to v1.9.3. + +_____________________________________________________________________ + `), }, }