jsenon / api-cni-cleanup

Kubernetes CNI cleanner
Apache License 2.0
28 stars 7 forks source link

Unable to delete the stale IP's #4

Open sahilsharma-bb opened 4 years ago

sahilsharma-bb commented 4 years ago

Hello @jsenon,

Thank you for the workaround. I tried to implement it but it didn't work out. Below is the information: K8s version: 1.11 Set-up by Kops on AWS EC2 nodes OS: Ubuntu:16.04

Issue: I ran it as a daemonset and commented out CronJob part (as suggested by you in your Readme) but I assume daemonset should run in kube-system namespace which was missing from the deployment.yaml file. Without mentioning it was failing. I added it and then deployed it as (DaemonSet, Service, ClusterRole, ClusterRoleBinding, ServiceAccount) and all are in kube-system namespace. It was running fine but was not deleting the stale IP files. Upon seeing the logs of the pod it was running as expected and when I hit the http://::/cleanup it didn't delete the CNI files. Don't know why?

Can you shed some light on this? Screenshots: API-CNI Pods: only-cni

Logs and API hit: cni-logs

Upon seeing the directory on the node (ls /var/lib/cni/networks/cbr0 | wc -l) I am getting an output 254. Hope this info helps you to understand the problem-statement.

jsenon commented 4 years ago

Hi @sahilsharma-bb

Sorry for delay, does the CNI files are located in /var/lib/cni ? if not have you specified the correct folder in the args of the container?

sahilsharma-bb commented 4 years ago

Hello @jsenon, Yes, my files are located at /var/lib/cni/networks/cbr0 folder and as you can see I didn't any error in the logs and when I hit the API I got "Done" as response. I am not seeing any gap in the implementation. Don't know why it is happening.