code: func ValidateKubeletFlags(f *KubeletFlags) error {
  	// ensure that nobody sets DynamicConfigDir if the dynamic config feature gate is turned off
  	if f.DynamicConfigDir.Provided() && !utilfeature.DefaultFeatureGate.Enabled(features.DynamicKubeletConfig) {
  		return fmt.Errorf("the DynamicKubeletConfig feature gate must be enabled in order to use the --dynamic-config-dir flag")
  	}
  	if f.NodeStatusMaxImages < -1 {
  		return fmt.Errorf("invalid configuration: NodeStatusMaxImages (--node-status-max-images) must be -1 or greater")
  	}
  
  	unknownLabels := sets.NewString()
  	for k := range f.NodeLabels {
  		if isKubernetesLabel(k) && !kubeletapis.IsKubeletLabel(k) {
  			unknownLabels.Insert(k)
  		}
  	}
  	if len(unknownLabels) > 0 {
  		// TODO(liggitt): in 1.16, return an error
  		klog.Warningf("unknown 'kubernetes.io' or 'k8s.io' labels specified with --node-labels: %v", unknownLabels.List())
  		klog.Warningf("in 1.16, --node-labels in the 'kubernetes.io' namespace must begin with an allowed prefix (%s) or be in the specifically allowed set (%s)", strings.Join(kubeletapis.KubeletLabelNamespaces(), ", "), strings.Join(kubeletapis.KubeletLabels(), ", "))
  	}
  
  	return nil
  }
docs: // ValidateKubeletFlags validates Kubelet's configuration flags and returns an error if they are invalid.