-
Notifications
You must be signed in to change notification settings - Fork 38.6k
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
kubeadm: Remove .ImagePullPolicy
from the v1alpha2 API
#64096
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,6 @@ import ( | |
"github.com/spf13/cobra" | ||
flag "github.com/spf13/pflag" | ||
|
||
"k8s.io/api/core/v1" | ||
"k8s.io/apimachinery/pkg/util/sets" | ||
clientset "k8s.io/client-go/kubernetes" | ||
kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm" | ||
|
@@ -92,12 +91,13 @@ var ( | |
This error is likely caused by: | ||
- The kubelet is not running | ||
- The kubelet is unhealthy due to a misconfiguration of the node in some way (required cgroups disabled) | ||
- Either there is no internet connection, or imagePullPolicy is set to "Never", | ||
so the kubelet cannot pull or find the following control plane images: | ||
- No internet connection is available so the kubelet cannot pull or find the following control plane images: | ||
- {{ .APIServerImage }} | ||
- {{ .ControllerManagerImage }} | ||
- {{ .SchedulerImage }} | ||
- {{ .EtcdImage }} (only if no external etcd endpoints are configured) | ||
- You can check or miligate this in beforehand with "kubeadm config images pull" to make sure the images | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. typo? "mitigate"? :) |
||
are downloaded locally and cached. | ||
|
||
If you are on a systemd-powered system, you can try to troubleshoot the error with the following commands: | ||
- 'systemctl status kubelet' | ||
|
@@ -538,12 +538,9 @@ func getWaiter(i *Init, client clientset.Interface) apiclient.Waiter { | |
return dryrunutil.NewWaiter() | ||
} | ||
|
||
// TODO: List images locally using `crictl` and pull in preflight checks if not available | ||
// When we do that, we can always assume the images exist at this point and have a shorter timeout. | ||
timeout := 30 * time.Minute | ||
|
||
// No need for a large timeout if we don't expect downloads | ||
if i.cfg.ImagePullPolicy == v1.PullNever { | ||
timeout = 60 * time.Second | ||
} | ||
return apiclient.NewKubeWaiter(client, timeout, os.Stdout) | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,7 +76,7 @@ func GetStaticPodSpecs(cfg *kubeadmapi.MasterConfiguration, k8sVersion *version. | |
kubeadmconstants.KubeAPIServer: staticpodutil.ComponentPod(v1.Container{ | ||
Name: kubeadmconstants.KubeAPIServer, | ||
Image: images.GetCoreImage(kubeadmconstants.KubeAPIServer, cfg.GetControlPlaneImageRepository(), cfg.KubernetesVersion, cfg.UnifiedControlPlaneImage), | ||
ImagePullPolicy: cfg.ImagePullPolicy, | ||
ImagePullPolicy: v1.PullIfNotPresent, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. kubelet defaults to |
||
Command: getAPIServerCommand(cfg), | ||
VolumeMounts: staticpodutil.VolumeMountMapToSlice(mounts.GetVolumeMounts(kubeadmconstants.KubeAPIServer)), | ||
LivenessProbe: staticpodutil.ComponentProbe(cfg, kubeadmconstants.KubeAPIServer, int(cfg.API.BindPort), "/healthz", v1.URISchemeHTTPS), | ||
|
@@ -86,7 +86,7 @@ func GetStaticPodSpecs(cfg *kubeadmapi.MasterConfiguration, k8sVersion *version. | |
kubeadmconstants.KubeControllerManager: staticpodutil.ComponentPod(v1.Container{ | ||
Name: kubeadmconstants.KubeControllerManager, | ||
Image: images.GetCoreImage(kubeadmconstants.KubeControllerManager, cfg.GetControlPlaneImageRepository(), cfg.KubernetesVersion, cfg.UnifiedControlPlaneImage), | ||
ImagePullPolicy: cfg.ImagePullPolicy, | ||
ImagePullPolicy: v1.PullIfNotPresent, | ||
Command: getControllerManagerCommand(cfg, k8sVersion), | ||
VolumeMounts: staticpodutil.VolumeMountMapToSlice(mounts.GetVolumeMounts(kubeadmconstants.KubeControllerManager)), | ||
LivenessProbe: staticpodutil.ComponentProbe(cfg, kubeadmconstants.KubeControllerManager, 10252, "/healthz", v1.URISchemeHTTP), | ||
|
@@ -96,7 +96,7 @@ func GetStaticPodSpecs(cfg *kubeadmapi.MasterConfiguration, k8sVersion *version. | |
kubeadmconstants.KubeScheduler: staticpodutil.ComponentPod(v1.Container{ | ||
Name: kubeadmconstants.KubeScheduler, | ||
Image: images.GetCoreImage(kubeadmconstants.KubeScheduler, cfg.GetControlPlaneImageRepository(), cfg.KubernetesVersion, cfg.UnifiedControlPlaneImage), | ||
ImagePullPolicy: cfg.ImagePullPolicy, | ||
ImagePullPolicy: v1.PullIfNotPresent, | ||
Command: getSchedulerCommand(cfg), | ||
VolumeMounts: staticpodutil.VolumeMountMapToSlice(mounts.GetVolumeMounts(kubeadmconstants.KubeScheduler)), | ||
LivenessProbe: staticpodutil.ComponentProbe(cfg, kubeadmconstants.KubeScheduler, 10251, "/healthz", v1.URISchemeHTTP), | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo in 'miligate', I assume you mean 'mitigate'. Also drop the word 'in'