Docker / Kubernetes - Failed to allocate IP for docker image

piccolo

Cadet
Joined
Apr 13, 2023
Messages
2
Hi all together,

i'm using freenas / truenas quite a while but now i'm complete new to docker / kubernetes in truenas scale.

I have installed a loadbalancer "metallb" to expose the image with a ip from the network. But when i delete a image for example "unifi" and try to create the same image "unifi" again it sais that there is already a image with that name. When i'm changing the name an allocate the samt ip i get pretty much the same error:

Failed to allocate IP for "ix-unifi2/unifi2-stun": can't change sharing key for "ix-unifi2/unifi2-stun", address also in use by ix-unifi/unifi-comm,ix-unifi/unifi-guestportal,ix-unifi/unifi-speedtest,ix-unifi/unifi-stun,ix-unifi/unifi: services can't share key

when i'm looking on console i can see that there are many old image namespaces in kubernetes that already should be gone:

k3s kubectl get svc --all-namespaces
NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
ix-pihole pihole-dns LoadBalancer 172.17.87.94 10.10.10.235 53:16732/UDP 31d
ix-pihole pihole-dns-tcp LoadBalancer 172.17.51.79 10.10.10.235 53:54327/TCP 31d
ix-pihole pihole LoadBalancer 172.17.118.0 10.10.10.235 80:57832/TCP 31d
ix-papermerge papermerge LoadBalancer 172.17.146.93 10.10.10.230 80:45370/TCP 34d
ix-unifi unifi-comm LoadBalancer 172.17.150.196 10.10.10.234 8080:47924/TCP 31d
ix-unifi unifi-guestportal LoadBalancer 172.17.95.56 10.10.10.234 8880:41264/TCP,8843:25232/TCP 31d
ix-unifi unifi LoadBalancer 172.17.72.33 10.10.10.234 8443:31068/TCP 31d
ix-unifi unifi-speedtest LoadBalancer 172.17.124.76 10.10.10.234 6789:57697/TCP 31d
ix-unifi unifi-stun LoadBalancer 172.17.3.136 10.10.10.234 3478:18528/UDP 31d

But ... when i'm trying to "k3s kubectl get ns" none of the namespaces are there.

Does anyone has a hint for me how to solve this issue?

Thanks and regards,
piccolo

Btw: my system is a truenas scale bluefin 22.12.2
 

piccolo

Cadet
Joined
Apr 13, 2023
Messages
2
I did a workaround ... i backed up all the apps data, unset the pool and deleted the dataset completely.
Then i setup a complete new environment and installed the machines i needed, restored their data and now it works again...

hopefully i do not need to do this again...
 
Top