# Functions
DryRunStaticPodUpgrade fakes an upgrade of the control plane.
EnforceVersionPolicies makes sure that the version the user specified is valid to upgrade to There are both fatal and skippable (with --force) errors.
InteractivelyConfirmUpgrade asks the user whether they _really_ want to upgrade.
NewCmdApply returns the cobra command for `kubeadm upgrade apply`.
NewCmdPlan returns the cobra command for `kubeadm upgrade plan`.
NewCmdUpgrade returns the cobra command for `kubeadm upgrade`.
PerformControlPlaneUpgrade actually performs the upgrade procedure for the cluster of your type (self-hosted or static-pod-hosted).
PerformStaticPodUpgrade performs the upgrade of the control plane components for a static pod hosted cluster.
RunApply takes care of the actual upgrade functionality It does the following things: - Checks if the cluster is healthy - Gets the configuration from the kubeadm-config ConfigMap in the cluster - Enforces all version skew policies - Asks the user if they really want to upgrade - Makes sure the control plane images are available locally on the master(s) - Upgrades the control plane components - Applies the other resources that'd be created with kubeadm init as well, like - Creating the RBAC rules for the bootstrap tokens and the cluster-info ConfigMap - Applying new kube-dns and kube-proxy manifests - Uploads the newly used configuration to the cluster ConfigMap.
RunPlan takes care of outputting available versions to upgrade to for the user.
SetImplicitFlags handles dynamically defaulting flags based on each other's value.