https://rancher.com/ logo
#general
Title
# general
c

crooked-cat-21365

01/29/2023, 4:52 PM
After the migration of rancher 1.6.9 from RKE to RKE2 a managed cluster got stuck in Provisioning:
Copy code
Error while applying agent YAML, it will be retried automatically: exit status 1, <http://clusterrole.rbac.authorization.k8s.io/proxy-clusterrole-kubeapiserver|clusterrole.rbac.authorization.k8s.io/proxy-clusterrole-kubeapiserver> unchanged <http://clusterrolebinding.rbac.authorization.k8s.io/proxy-role-binding-kubernetes-master|clusterrolebinding.rbac.authorization.k8s.io/proxy-role-binding-kubernetes-master> unchanged namespace/cattle-system unchanged serviceaccount/cattle unchanged <http://clusterrolebinding.rbac.authorization.k8s.io/cattle-admin-binding|clusterrolebinding.rbac.authorization.k8s.io/cattle-admin-binding> unchanged secret/cattle-credentials-713674f unchanged <http://clusterrole.rbac.authorization.k8s.io/cattle-admin|clusterrole.rbac.authorization.k8s.io/cattle-admin> unchanged daemonset.apps/kube-api-auth unchanged service/cattle-cluster-agent unchanged Error from server (Invalid): error when applying patch: {"metadata":{"annotations":{"<http://kubectl.kubernetes.io/last-applied-configuration|kubectl.kubernetes.io/last-applied-configuration>":"{\"apiVersion\":\"apps/v1\",\"kind\":\"Deployment\",\"metadata\":{\"annotations\":{\"<http://management.cattle.io/scale-available\|management.cattle.io/scale-available\>":\"2\"},\"name\":\"cattle-cluster-agent\",\"namespace\":\"cattle-system\"},\"spec\":{\"selector\":{\"matchLabels\":{\"app\":\"cattle-cluster-agent\"}},\"strategy\":{\"rollingUpdate\":{\"maxSurge\":1,\"maxUnavailable\":0},\"type\":\"RollingUpdate\"},\"template\":{\"metadata\":{\"labels\":{\"app\":\"cattle-cluster-agent\"}},\"spec\":{\"affinity\":{\"nodeAffinity\":{\"preferredDuringSchedulingIgnoredDuringExecution\":[{\"preference\":{\"matchExpressions\":[{\"key\":\"<http://node-role.kubernetes.io/controlplane\|node-role.kubernetes.io/controlplane\>",\"operator\":\"In\",\"values\":[\"true\"]}]},\"weight\":100},{\"preference\":{\"matchExpressions\":[{\"key\":\"<http://node-role.kubernetes.io/control-plane\|node-role.kubernetes.io/control-plane\>",\"operator\":\"In\",\"values\":[\"true\"]}]},\"weight\":100},{\"preference\":{\"matchExpressions\":[{\"key\":\"<http://node-role.kubernetes.io/master\|node-role.kubernetes.io/master\>",\"operator\":\"In\",\"values\":[\"true\"]}]},\"weight\":100},{\"preference\":{\"matchExpressions\":[{\"key\":\"<http://cattle.io/cluster-agent\|cattle.io/cluster-agent\>",\"operator\":\"In\",\"values\":[\"true\"]}]},\"weight\":1}],\"requiredDuringSchedulingIgnoredDuringExecution\":{\"nodeSelectorTerms\":[{\"matchExpressions\":[{\"key\":\"<http://beta.kubernetes.io/os\|beta.kubernetes.io/os\>",\"operator\":\"NotIn\",\"values\":[\"windows\"]}]}]}},\"podAntiAffinity\":{\"preferredDuringSchedulingIgnoredDuringExecution\":[{\"podAffinityTerm\":{\"labelSelector\":{\"matchExpressions\":[{\"key\":\"app\",\"operator\":\"In\",\"values\":[\"cattle-cluster-agent\"]}]},\"topologyKey\":\"<http://kubernetes.io/hostname\|kubernetes.io/hostname\>"},\"weight\":100}]}},\"containers\":[{\"env\":[{\"name\":\"CATTLE_FEATURES\",\"value\":\"embedded-cluster-api=false,fleet=false,monitoringv1=false,multi-cluster-management=false,multi-cluster-management-agent=true,provisioningv2=false,rke2=false\"},{\"name\":\"CATTLE_IS_RKE\",\"value\":\"true\"},{\"name\":\"CATTLE_SERVER\",\"value\":\"<https://rancher01.ac.aixigo.de>\"},{\"name\":\"CATTLE_CA_CHECKSUM\",\"value\":\"\"},{\"name\":\"CATTLE_CLUSTER\",\"value\":\"true\"},{\"name\":\"CATTLE_K8S_MANAGED\",\"value\":\"true\"},{\"name\":\"CATTLE_CLUSTER_REGISTRY\",\"value\":\"\"},{\"name\":\"CATTLE_SERVER_VERSION\",\"value\":\"v2.6.9\"},{\"name\":\"CATTLE_INSTALL_UUID\",\"value\":\"b55cfe32-1daa-4848-b5f5-a7532f5eacd2\"},{\"name\":\"CATTLE_INGRESS_IP_DOMAIN\",\"value\":\"<http://sslip.io|sslip.io>\"},{\"name\":\"\"}],\"image\":\"rancher/rancher-agent:v2.6.9\",\"imagePullPolicy\":\"IfNotPresent\",\"name\":\"cluster-register\",\"volumeMounts\":[{\"mountPath\":\"/cattle-credentials\",\"name\":\"cattle-credentials\",\"readOnly\":true}]}],\"serviceAccountName\":\"cattle\",\"tolerations\":[{\"effect\":\"NoSchedule\",\"key\":\"<http://node-role.kubernetes.io/controlplane\|node-role.kubernetes.io/controlplane\>",\"value\":\"true\"},{\"effect\":\"NoSchedule\",\"key\":\"<http://node-role.kubernetes.io/control-plane\|node-role.kubernetes.io/control-plane\>",\"operator\":\"Exists\"},{\"effect\":\"NoSchedule\",\"key\":\"<http://node-role.kubernetes.io/master\|node-role.kubernetes.io/master\>",\"operator\":\"Exists\"}],\"volumes\":[{\"name\":\"cattle-credentials\",\"secret\":{\"defaultMode\":320,\"secretName\":\"cattle-credentials-713674f\"}}]}}}}\n"}},"spec":{"template":{"spec":{"$setElementOrder/containers":[{"name":"cluster-register"}],"containers":[{"$setElementOrder/env":[{"name":"CATTLE_FEATURES"},{"name":"CATTLE_IS_RKE"},{"name":"CATTLE_SERVER"},{"name":"CATTLE_CA_CHECKSUM"},{"name":"CATTLE_CLUSTER"},{"name":"CATTLE_K8S_MANAGED"},{"name":"CATTLE_CLUSTER_REGISTRY"},{"name":"CATTLE_SERVER_VERSION"},{"name":"CATTLE_INSTALL_UUID"},{"name":"CATTLE_INGRESS_IP_DOMAIN"},{"name":""}],"env":[{"name":"CATTLE_CA_CHECKSUM","value":""},{"name":"CATTLE_CLUSTER_REGISTRY","value":""},{"name":""}],"name":"cluster-register"}]}}}} to: Resource: "apps/v1, Resource=deployments", GroupVersionKind: "apps/v1, Kind=Deployment" Name: "cattle-cluster-agent", Namespace: "cattle-system" for: "./management-statefile_path_redacted": Deployment.apps "cattle-cluster-agent" is invalid: spec.template.spec.containers[0].env[10].name: Required value Error from server (Invalid): error when applying patch: {"metadata":{"annotations":{"<http://kubectl.kubernetes.io/last-applied-configuration|kubectl.kubernetes.io/last-applied-configuration>":"{\"apiVersion\":\"apps/v1\",\"kind\":\"DaemonSet\",\"metadata\":{\"annotations\":{},\"name\":\"cattle-node-agent\",\"namespace\":\"cattle-system\"},\"spec\":{\"selector\":{\"matchLabels\":{\"app\":\"cattle-agent\"}},\"template\":{\"metadata\":{\"labels\":{\"app\":\"cattle-agent\"}},\"spec\":{\"affinity\":{\"nodeAffinity\":{\"requiredDuringSchedulingIgnoredDuringExecution\":{\"nodeSelectorTerms\":[{\"matchExpressions\":[{\"key\":\"<http://beta.kubernetes.io/os\|beta.kubernetes.io/os\>",\"operator\":\"NotIn\",\"values\":[\"windows\"]}]}]}}},\"containers\":[{\"env\":[{\"name\":\"CATTLE_NODE_NAME\",\"valueFrom\":{\"fieldRef\":{\"fieldPath\":\"spec.nodeName\"}}},{\"name\":\"CATTLE_SERVER\",\"value\":\"<https://rancher01.ac.aixigo.de>\"},{\"name\":\"CATTLE_CA_CHECKSUM\",\"value\":\"\"},{\"name\":\"CATTLE_CLUSTER\",\"value\":\"false\"},{\"name\":\"CATTLE_K8S_MANAGED\",\"value\":\"true\"},{\"name\":\"CATTLE_AGENT_CONNECT\",\"value\":\"true\"},{\"name\":\"CATTLE_SERVER_VERSION\",\"value\":\"v2.6.9\"},{\"name\":\"CATTLE_INSTALL_UUID\",\"value\":\"b55cfe32-1daa-4848-b5f5-a7532f5eacd2\"},{\"name\":\"CATTLE_INGRESS_IP_DOMAIN\",\"value\":\"<http://sslip.io|sslip.io>\"},{\"name\":\"\"}],\"image\":\"rancher/rancher-agent:v2.6.9\",\"imagePullPolicy\":\"IfNotPresent\",\"name\":\"agent\",\"securityContext\":{\"privileged\":true},\"volumeMounts\":[{\"mountPath\":\"/cattle-credentials\",\"name\":\"cattle-credentials\",\"readOnly\":true},{\"mountPath\":\"/etc/kubernetes\",\"name\":\"k8s-ssl\"},{\"mountPath\":\"/var/run\",\"mountPropagation\":\"HostToContainer\",\"name\":\"var-run\"},{\"mountPath\":\"/run\",\"mountPropagation\":\"HostToContainer\",\"name\":\"run\"},{\"mountPath\":\"/etc/docker/certs.d\",\"name\":\"docker-certs\"}]}],\"hostNetwork\":true,\"serviceAccountName\":\"cattle\",\"tolerations\":[{\"operator\":\"Exists\"}],\"volumes\":[{\"hostPath\":{\"path\":\"/etc/kubernetes\",\"type\":\"DirectoryOrCreate\"},\"name\":\"k8s-ssl\"},{\"hostPath\":{\"path\":\"/var/run\",\"type\":\"DirectoryOrCreate\"},\"name\":\"var-run\"},{\"hostPath\":{\"path\":\"/run\",\"type\":\"DirectoryOrCreate\"},\"name\":\"run\"},{\"name\":\"cattle-credentials\",\"secret\":{\"defaultMode\":320,\"secretName\":\"cattle-credentials-713674f\"}},{\"hostPath\":{\"path\":\"/etc/docker/certs.d\",\"type\":\"DirectoryOrCreate\"},\"name\":\"docker-certs\"}]}},\"updateStrategy\":{\"rollingUpdate\":{\"maxUnavailable\":\"50%\"},\"type\":\"RollingUpdate\"}}}\n"}},"spec":{"template":{"spec":{"$setElementOrder/containers":[{"name":"agent"}],"containers":[{"$setElementOrder/env":[{"name":"CATTLE_NODE_NAME"},{"name":"CATTLE_SERVER"},{"name":"CATTLE_CA_CHECKSUM"},{"name":"CATTLE_CLUSTER"},{"name":"CATTLE_K8S_MANAGED"},{"name":"CATTLE_AGENT_CONNECT"},{"name":"CATTLE_SERVER_VERSION"},{"name":"CATTLE_INSTALL_UUID"},{"name":"CATTLE_INGRESS_IP_DOMAIN"},{"name":""}],"env":[{"name":"CATTLE_CA_CHECKSUM","value":""},{"name":""}],"name":"agent"}]}}}} to: Resource: "apps/v1, Resource=daemonsets", GroupVersionKind: "apps/v1, Kind=DaemonSet" Name: "cattle-node-agent", Namespace: "cattle-system" for: "./management-statefile_path_redacted": DaemonSet.apps "cattle-node-agent" is invalid: spec.template.spec.containers[0].env[9].name: Required value
What is it trying to tell me?
20 Views