diff --git a/cmd/kubelet/app/options/options.go b/cmd/kubelet/app/options/options.go index 8bc9f5becc4..1df0cb13ece 100644 --- a/cmd/kubelet/app/options/options.go +++ b/cmd/kubelet/app/options/options.go @@ -321,8 +321,6 @@ func (f *KubeletFlags) AddFlags(mainfs *pflag.FlagSet) { func addContainerRuntimeFlags(fs *pflag.FlagSet, o *kubeletconfig.ContainerRuntimeOptions) { // General settings. fs.StringVar(&o.RuntimeCgroups, "runtime-cgroups", o.RuntimeCgroups, "Optional absolute name of cgroups to create and run the runtime in.") - _ = fs.String("pod-infra-container-image", "", "Specified image will not be pruned by the image garbage collector. CRI implementations have their own configuration to set this image.") - _ = fs.MarkDeprecated("pod-infra-container-image", "will be removed in 1.35. Image garbage collector will get sandbox image information from CRI.") // Image credential provider settings. fs.StringVar(&o.ImageCredentialProviderConfigPath, "image-credential-provider-config", o.ImageCredentialProviderConfigPath, "Path to a credential provider plugin config file (JSON/YAML/YML) or a directory of such files (merged in lexicographical order; non-recursive search).") diff --git a/cmd/kubelet/app/server.go b/cmd/kubelet/app/server.go index 7e0c71c273b..09bf74f98e2 100644 --- a/cmd/kubelet/app/server.go +++ b/cmd/kubelet/app/server.go @@ -209,11 +209,6 @@ is checked every 20 seconds (also configurable with a flag).`, return fmt.Errorf("failed to validate kubelet flags: %w", err) } - if cleanFlagSet.Changed("pod-infra-container-image") { - logger.Info("--pod-infra-container-image will not be pruned by the image garbage collector in kubelet and should also be set in the remote runtime") - _ = cmd.Flags().MarkDeprecated("pod-infra-container-image", "--pod-infra-container-image will be removed in 1.35. Image garbage collector will get sandbox image information from CRI.") - } - // load kubelet config file, if provided if len(kubeletFlags.KubeletConfigFile) > 0 { kubeletConfig, err = loadConfigFile(ctx, kubeletFlags.KubeletConfigFile)