Description of problem: Got the below errors when creating the KubeletConfig object: mac:~ jianzhang$ oc create -f pod_evication.yaml The KubeletConfig "worker-kubeconfig" is invalid: * spec.kubeletConfig.apiVersion: Required value: must not be empty * spec.kubeletConfig.kind: Required value: must not be empty Version-Release number of selected component (if applicable): Cluster version is 4.4.0-0.nightly-2020-03-08-235004 How reproducible: always Steps to Reproduce: 1. Create a KubeleteConfig object by following https://docs.openshift.com/container-platform/4.3/nodes/nodes/nodes-nodes-garbage-collection.html#nodes-nodes-garbage-collection-configuring_nodes-nodes-configuring mac:~ jianzhang$ oc label machineconfigpool worker custom-kubelet=small-pods machineconfigpool.machineconfiguration.openshift.io/worker labeled mac:~ jianzhang$ cat pod_evication.yaml apiVersion: machineconfiguration.openshift.io/v1 kind: KubeletConfig metadata: name: worker-kubeconfig spec: machineConfigPoolSelector: matchLabels: custom-kubelet: small-pods kubeletConfig: evictionSoft: memory.available: "90%" nodefs.available: "90%" nodefs.inodesFree: "90%" evictionPressureTransitionPeriod: 0s Actual results: Got the below errors: mac:~ jianzhang$ oc create -f pod_evication.yaml The KubeletConfig "worker-kubeconfig" is invalid: * spec.kubeletConfig.apiVersion: Required value: must not be empty * spec.kubeletConfig.kind: Required value: must not be empty Expected results: The KubeletConfig object can be created successfully. Additional info: It did work well in 4.4.0-0.nightly-2020-03-04-012453. mac:~ jianzhang$ oc create -f pod_evication.yaml kubeletconfig.machineconfiguration.openshift.io/worker-kubeconfig created mac:~ jianzhang$ oc get clusterversion NAME VERSION AVAILABLE PROGRESSING SINCE STATUS version 4.4.0-0.nightly-2020-03-04-012453 True False 58m Cluster version is 4.4.0-0.nightly-2020-03-04-012453
Workaround: add the apiVersion/Kind in it: mac:~ jianzhang$ cat pod_evication.yaml apiVersion: machineconfiguration.openshift.io/v1 kind: KubeletConfig metadata: name: worker-kubeconfig spec: machineConfigPoolSelector: matchLabels: custom-kubelet: small-pods kubeletConfig: apiVersion: machineconfiguration.openshift.io/v1 kind: KubeletConfig evictionSoft: memory.available: "90%" nodefs.available: "90%" nodefs.inodesFree: "90%" evictionPressureTransitionPeriod: 0s mac:~ jianzhang$ oc create -f pod_evication.yaml kubeletconfig.machineconfiguration.openshift.io/worker-kubeconfig created mac:~ jianzhang$ oc get machineconfigpool NAME CONFIG UPDATED UPDATING DEGRADED MACHINECOUNT READYMACHINECOUNT UPDATEDMACHINECOUNT DEGRADEDMACHINECOUNT AGE master rendered-master-e3490b51f062c3a94b508209b44089f6 True False False 3 3 3 0 94m worker rendered-worker-9bf0b68b8e317cb5aaccf7b61b2d13f5 False True False 3 0 0 0 94m mac:~ jianzhang$ oc get nodes NAME STATUS ROLES AGE VERSION ip-10-0-131-77.us-east-2.compute.internal Ready worker 88m v1.17.1 ip-10-0-133-75.us-east-2.compute.internal Ready master 95m v1.17.1 ip-10-0-146-18.us-east-2.compute.internal Ready master 96m v1.17.1 ip-10-0-153-230.us-east-2.compute.internal NotReady,SchedulingDisabled worker 90m v1.17.1 ip-10-0-168-220.us-east-2.compute.internal Ready worker 88m v1.17.1 ip-10-0-173-167.us-east-2.compute.internal Ready master 96m v1.17.1
*** This bug has been marked as a duplicate of bug 1811211 ***