Missing kubeProxyConfiguration

Hi All, As part of troubleshooting network configurations exercise, followed the Hint to make sure the config map & kube-proxy config both are referrin to the same location & file, but later came across the error mentioned in the screenshot, it seems api kubeProxyConfiguration is missing, the kubernetes cluster seems to be of version 1.20.0.
when I executed kubectl api-resoures. I could not see the kind - kubeProxyConfiguration
Error:-

Request your help with understanding whether this is an issue related to Kubernetes version (1.20.0), If not could you suggest solution and what could be wrong with my steps.

Thanks
Santosh

Hi @santosh.arvind,

Can you share the lab URL?

Thanks,
Trung.

Hi Trung

Below is the Lab URL

CKA Certification Course – Certified Kubernetes Administrator | KodeKloud

Thanks
Santosh

1 Like

Hi @santosh.arvind,

Exercise 1:

1st step, I checked the mysql pod and see it stuck in the ContainerCreating state.

k get po mysql -n triton
NAME    READY   STATUS              RESTARTS   AGE
mysql   0/1     ContainerCreating   0          84s

Then I describe the pod to see what went wrong.

root@controlplane:/# k describe po mysql -n triton
Failed to create pod sandbox: rpc error: code = Unknown desc = [failed to set up sandbox container "ec66faed761a8e1a32f71ffc19f6681f1cc3834f0b2b662151f8a6e30b1872a1" network for pod "mysql": networkPlugin cni failed to set up pod 

The error message then directs me to check the network addon.

root@controlplane:/# kubectl get po -n kube-system

Confirmed the network addon mission, need to install one (weave could be good candidate).
Use below command to install weave:

curl -L https://github.com/weaveworks/weave/releases/download/latest_release/weave-daemonset-k8s-1.11.yaml | kubectl apply -f -
root@controlplane:/# k get po -n kube-system
NAME                                   READY   STATUS    RESTARTS   AGE
weave-net-rq5pc                        2/2     Running   0          29s

Wait for a while and check the pod in the kube-system namespace again, confirm the weave pods running.
Come back and check the mysql pod, it should be transitioned to a Running state now.

root@controlplane:/# k get po -n triton
NAME                            READY   STATUS    RESTARTS   AGE
mysql                           1/1     Running   0          7m8s
webapp-mysql-54db464f4f-z46k6   1/1     Running   0          7m7s

Check the app link and confirm it worked.

image

Exercise 2:
Should be quicker than the 1st one, I checked db pod, web pod, they all running ok. Then check the svc, they all have correct endpoints.
So move to check kube-system pod, I see the problem with kube-proxy.
After checking logs, we can see the problem with kube proxy, so going to fix it by getting the current yaml of the proxy DS.
Then correct the configuration path, and apply the change.

containers:
      - command:
        - /usr/local/bin/kube-proxy
        - --config=/var/lib/kube-proxy/config.conf

After correct, the config, the kube-proxy DS able to run well, and the problem was fixed.

Thanks,
Trung.