I have K8S cluster with rancher and i run rke to add new nodes.
Running RKE version: v1.2.18
Kubernetes Version: v1.20.15
Since few weeks, the rke process failed with this error:
time="2022-12-26T01:56:35-05:00" level=info msg="[network] Setting up network plugin: canal"
time="2022-12-26T01:56:35-05:00" level=info msg="[addons] Saving ConfigMap for addon rke-network-plugin to Kubernetes"
time="2022-12-26T01:56:35-05:00" level=info msg="[addons] Successfully saved ConfigMap for addon rke-network-plugin to Kubernetes"
time="2022-12-26T01:56:35-05:00" level=info msg="[addons] Executing deploy job rke-network-plugin"
time="2022-12-26T01:56:35-05:00" level=debug msg="Checking node list for node [10.11.187.184], try #1"
time="2022-12-26T01:56:35-05:00" level=debug msg="[k8s] replacing job rke-network-plugin-deploy-job.. "
time="2022-12-26T01:56:40-05:00" level=debug msg="[k8s] waiting for job rke-network-plugin-deploy-job to complete.."
time="2022-12-26T01:57:40-05:00" level=fatal msg="Failed to get job complete status for job rke-network-plugin-deploy-job in namespace kube-system"
Logs of rke-network-plugin-deploy-job:
Resource: "apiextensions.k8s.io/v1, Resource=customresourcedefinitions", GroupVersionKind: "apiextensions.k8s.io/v1, Kind=CustomResourceDefinition"
Name: "networksets.crd.projectcalico.org", Namespace: ""
for: "/etc/config/rke-network-plugin.yaml": customresourcedefinitions.apiextensions.k8s.io "networksets.crd.projectcalico.org" is invalid: metadata.resourceVersion: Invalid value: 0x0: must be specified for an update
CRD yaml:
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"apiextensions.k8s.io/v1beta1","kind":"CustomResourceDefinition","metadata":{"annotations":{},"creationTimestamp":"2019-10-31T14:11:28Z","generation":1,"name":"networksets.crd.projectcalico.org","namespace":"","resourceVersion":"197472064","selfLink":"/apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions/networksets.crd.projectcalico.org","uid":"9dfc6e5b-f861-4d35-ae2e-004cd212686e"},"spec":{"conversion":{"strategy":"None"},"group":"crd.projectcalico.org","names":{"kind":"NetworkSet","listKind":"NetworkSetList","plural":"networksets","singular":"networkset"},"preserveUnknownFields":true,"scope":"Namespaced","version":"v1","versions":[{"name":"v1","served":true,"storage":true}]},"status":{"acceptedNames":{"kind":"NetworkSet","listKind":"NetworkSetList","plural":"networksets","singular":"networkset"},"conditions":[{"lastTransitionTime":"2019-10-31T14:11:28Z","message":"no conflicts found","reason":"NoConflicts","status":"True","type":"NamesAccepted"},{"lastTransitionTime":null,"message":"the initial names have been accepted","reason":"InitialNamesAccepted","status":"True","type":"Established"}],"storedVersions":["v1"]}}
creationTimestamp: "2019-10-31T14:11:28Z"
generation: 1
name: networksets.crd.projectcalico.org
resourceVersion: "1926345484"
uid: 9dfc6e5b-f861-4d35-ae2e-004cd212686e
spec:
conversion:
strategy: None
group: crd.projectcalico.org
names:
kind: NetworkSet
listKind: NetworkSetList
plural: networksets
singular: networkset
preserveUnknownFields: true
scope: Namespaced
versions:
- name: v1
served: true
storage: true
status:
acceptedNames:
kind: NetworkSet
listKind: NetworkSetList
plural: networksets
singular: networkset
conditions:
- lastTransitionTime: "2019-10-31T14:11:28Z"
message: no conflicts found
reason: NoConflicts
status: "True"
type: NamesAccepted
- lastTransitionTime: null
message: the initial names have been accepted
reason: InitialNamesAccepted
status: "True"
type: Established
- lastTransitionTime: "2022-06-13T14:07:44Z"
message: 'spec.preserveUnknownFields: Invalid value: true: must be false'
reason: Violations
status: "True"
type: NonStructuralSchema
storedVersions:
- v1
Is there any idea how to solve it and what is the root cause of this error?