<p>I get this log error for a pod like below but I updated kubernetes orchestrator, clusters, and nodes to kubernetes v1.21.2. Before updating it, they were v1.20.7. I found a reference that from v1.21, selfLink is completely removed. Why am I getting this error? How can I resolve this issue?</p>
<p><strong>error log for kubectl logs (podname)</strong></p>
<pre><code>...
2021-08-10T03:07:19.535Z        INFO    setup   starting manager
2021-08-10T03:07:19.536Z        INFO    controller-runtime.manager      starting metrics server {&quot;path&quot;: &quot;/metrics&quot;}
E0810 03:07:19.550636       1 event.go:247] Could not construct reference to: '&amp;v1.ConfigMap{TypeMeta:v1.TypeMeta{Kind:&quot;&quot;, APIVersion:&quot;&quot;}, ObjectMeta:v1.ObjectMeta{Name:&quot;controller-leader-election-helper&quot;, GenerateName:&quot;&quot;, Namespace:&quot;kubestone-system&quot;, SelfLink:&quot;&quot;, UID:&quot;b01651ed-7d54-4815-a047-57b16d26cfdf&quot;, ResourceVersion:&quot;65956&quot;, Generation:0, CreationTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:63764161639, loc:(*time.Location)(0x21639e0)}}, DeletionTimestamp:(*v1.Time)(nil), DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string(nil), Annotations:map[string]string{&quot;control-plane.alpha.kubernetes.io/leader&quot;:&quot;{\&quot;holderIdentity\&quot;:\&quot;kubestone-controller-manager-f467b7c47-cv7ws_1305bc36-f988-11eb-81fc-a20dfb9758a2\&quot;,\&quot;leaseDurationSeconds\&quot;:15,\&quot;acquireTime\&quot;:\&quot;2021-08-10T03:07:19Z\&quot;,\&quot;renewTime\&quot;:\&quot;2021-08-10T03:07:19Z\&quot;,\&quot;leaderTransitions\&quot;:0}&quot;}, OwnerReferences:[]v1.OwnerReference(nil), Initializers:(*v1.Initializers)(nil), Finalizers:[]string(nil), ClusterName:&quot;&quot;, ManagedFields:[]v1.ManagedFieldsEntry{v1.ManagedFieldsEntry{Manager:&quot;manager&quot;, Operation:&quot;Update&quot;, APIVersion:&quot;v1&quot;, Time:(*v1.Time)(0xc0000956a0), Fields:(*v1.Fields)(nil)}}}, Data:map[string]string(nil), BinaryData:map[string][]uint8(nil)}' due to: 'selfLink was empty, can't make reference'. Will not report event: 'Normal' 'LeaderElection' 'kubestone-controller-manager-f467b7c47-cv7ws_1305bc36-f988-11eb-81fc-a20dfb9758a2 became leader'
2021-08-10T03:07:21.636Z        INFO    controller-runtime.controller   Starting Controller     {&quot;controller&quot;: &quot;kafkabench&quot;}
...
</code></pre>
<p><strong>kubectl get nodes to show kubernetes version: the node that the pod is scheduled is aks-default-41152893-vmss000000</strong></p>
<pre><code>PS C:\Users\user&gt; kubectl get nodes -A
NAME                              STATUS   ROLES   AGE     VERSION
aks-default-41152893-vmss000000   Ready    agent   5h32m   v1.21.2
aks-default-41152893-vmss000001   Ready    agent   5h29m   v1.21.2
aksnpwi000000                     Ready    agent   5h32m   v1.21.2
aksnpwi000001                     Ready    agent   5h26m   v1.21.2
aksnpwi000002                     Ready    agent   5h19m   v1.21.2
</code></pre>
<p><strong>kubectl describe pods (pod name: kubestone-controller-manager-f467b7c47-cv7ws)</strong></p>
<pre><code>PS C:\Users\user&gt; kubectl describe pods kubestone-controller-manager-f467b7c47-cv7ws -n kubestone-system
Name:         kubestone-controller-manager-f467b7c47-cv7ws
Namespace:    kubestone-system
Priority:     0
Node:         aks-default-41152893-vmss000000/10.240.0.4
Start Time:   Mon, 09 Aug 2021 23:07:16 -0400
Labels:       control-plane=controller-manager
              pod-template-hash=f467b7c47
Annotations:  &lt;none&gt;
Status:       Running
IP:           10.240.0.21
IPs:
  IP:           10.240.0.21
Controlled By:  ReplicaSet/kubestone-controller-manager-f467b7c47
Containers:
  manager:
    Container ID:  containerd://01594df678a2c1d7163c913eff33881edf02e39633b1a4b51dcf5fb769d0bc1e
    Image:         user2/imagename
    Image ID:      docker.io/user2/imagename@sha256:aa049f135931192630ceda014d7a24306442582dbeeaa36ede48e6599b6135e1
    Port:          &lt;none&gt;
    Host Port:     &lt;none&gt;
    Command:
      /manager
    Args:
      --enable-leader-election
    State:          Running
      Started:      Mon, 09 Aug 2021 23:07:18 -0400
    Ready:          True
    Restart Count:  0
    Limits:
      cpu:     100m
      memory:  30Mi
    Requests:
      cpu:        100m
      memory:     20Mi
    Environment:  &lt;none&gt;
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-jvjjh (ro)
Conditions:
  Type              Status
  Initialized       True
  Ready             True
  ContainersReady   True
  PodScheduled      True
Volumes:
  kube-api-access-jvjjh:
    Type:                    Projected (a volume that contains injected data from multiple sources)
    TokenExpirationSeconds:  3607
    ConfigMapName:           kube-root-ca.crt
    ConfigMapOptional:       &lt;nil&gt;
    DownwardAPI:             true
QoS Class:                   Burstable
Node-Selectors:              kubernetes.io/os=linux
Tolerations:                 node.kubernetes.io/memory-pressure:NoSchedule op=Exists
                             node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                             node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
  Type    Reason     Age   From               Message
  ----    ------     ----  ----               -------
  Normal  Scheduled  23m   default-scheduler  Successfully assigned kubestone-system/kubestone-controller-manager-f467b7c47-cv7ws to aks-default-41152893-vmss000000
  Normal  Pulling    23m   kubelet            Pulling image &quot;user2/imagename&quot;
  Normal  Pulled     23m   kubelet            Successfully pulled image &quot;user2/imagename&quot; in 354.899039ms
  Normal  Created    23m   kubelet            Created container manager
  Normal  Started    23m   kubelet            Started container manager
</code></pre>

yunlee
<p>Kubestone has had no releases since 2019, it needs to upgrade its copy of the Kubernetes Go client. That said, this appears to only impact the event recorder system so probably not a huge deal.</p>
