Using External Network Interface With Launch Docker Image Prevents Container From Starting

HarryMuscle

Contributor
Joined
Nov 15, 2021
Messages
161
I'm running TrueNAS Scale RC22.02 RC2 and when using the Launch Docker Image functionality if I select an external network interface in the network section the container will not start. It simply sits at Deploying. Changing nothing except for not selecting an external interface allows the container to start normally. The machine only has one network card, does Kubernetes require a separate NIC for each container that wants to use an external network interface? Is there some way I could figure out what might be causing the issue?

Thanks,
Harry
 
Last edited:

HarryMuscle

Contributor
Joined
Nov 15, 2021
Messages
161
Here's the information from my k3s error log in the /var/log directory that's related to starting the container:

Code:
Jan 29 15:35:59 truenas k3s[16698]: I0129 15:35:59.101121   16698 event.go:291] "Event occurred" object="ix-nginx/nginx-ix-chart" kind="Deployment" apiVersion="apps/v1" type="Normal" reason="ScalingReplicaSet" message="Scaled up replica set nginx-ix-chart-66c4c9bd5f to 1"
Jan 29 15:35:59 truenas k3s[16698]: I0129 15:35:59.111222   16698 event.go:291] "Event occurred" object="ix-nginx/nginx-ix-chart-66c4c9bd5f" kind="ReplicaSet" apiVersion="apps/v1" type="Normal" reason="SuccessfulCreate" message="Created pod: nginx-ix-chart-66c4c9bd5f-6tcj8"
Jan 29 15:35:59 truenas k3s[16698]: I0129 15:35:59.114074   16698 topology_manager.go:187] "Topology Admit Handler"
Jan 29 15:35:59 truenas k3s[16698]: I0129 15:35:59.310818   16698 reconciler.go:224] "operationExecutor.VerifyControllerAttachedVolume started for volume \"kube-api-access-pfpf5\" (UniqueName: \"kubernetes.io/projected/00616983-f1f6-46d1-9e7c-6866f26ae1f1-kube-api-access-pfpf5\") pod \"nginx-ix-chart-66c4c9bd5f-6tcj8\" (UID: \"00616983-f1f6-46d1-9e7c-6866f26ae1f1\") "
Jan 29 15:36:04 truenas k3s[16698]: E0129 15:36:04.145882   16698 cadvisor_stats_provider.go:151] "Unable to fetch pod etc hosts stats" err="failed to get stats failed command 'du' ($ nice -n 19 du -x -s -B 1) on path /var/lib/kubelet/pods/00616983-f1f6-46d1-9e7c-6866f26ae1f1/etc-hosts with error exit status 1" pod="ix-nginx/nginx-ix-chart-66c4c9bd5f-6tcj8"
Jan 29 15:36:14 truenas k3s[16698]: E0129 15:36:14.162337   16698 cadvisor_stats_provider.go:151] "Unable to fetch pod etc hosts stats" err="failed to get stats failed command 'du' ($ nice -n 19 du -x -s -B 1) on path /var/lib/kubelet/pods/00616983-f1f6-46d1-9e7c-6866f26ae1f1/etc-hosts with error exit status 1" pod="ix-nginx/nginx-ix-chart-66c4c9bd5f-6tcj8"
Jan 29 15:36:24 truenas k3s[16698]: E0129 15:36:24.178386   16698 cadvisor_stats_provider.go:151] "Unable to fetch pod etc hosts stats" err="failed to get stats failed command 'du' ($ nice -n 19 du -x -s -B 1) on path /var/lib/kubelet/pods/00616983-f1f6-46d1-9e7c-6866f26ae1f1/etc-hosts with error exit status 1" pod="ix-nginx/nginx-ix-chart-66c4c9bd5f-6tcj8"
Jan 29 15:36:34 truenas k3s[16698]: E0129 15:36:34.198025   16698 cadvisor_stats_provider.go:151] "Unable to fetch pod etc hosts stats" err="failed to get stats failed command 'du' ($ nice -n 19 du -x -s -B 1) on path /var/lib/kubelet/pods/00616983-f1f6-46d1-9e7c-6866f26ae1f1/etc-hosts with error exit status 1" pod="ix-nginx/nginx-ix-chart-66c4c9bd5f-6tcj8"
Jan 29 15:36:44 truenas k3s[16698]: E0129 15:36:44.221338   16698 cadvisor_stats_provider.go:151] "Unable to fetch pod etc hosts stats" err="failed to get stats failed command 'du' ($ nice -n 19 du -x -s -B 1) on path /var/lib/kubelet/pods/00616983-f1f6-46d1-9e7c-6866f26ae1f1/etc-hosts with error exit status 1" pod="ix-nginx/nginx-ix-chart-66c4c9bd5f-6tcj8"


Hopefully that's helpful.

Thanks,
Harry
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
The machine only has one network card, does Kubernetes require a separate NIC for each container that wants to use an external network interface? Is there some way I could figure out what might be causing the issue?
The way to do that right is to not give your NIC an IP address and add it to a bridge (which you give the TrueNAS host IP to) and then join your additional services to the bridge rather than the NIC.
 

HarryMuscle

Contributor
Joined
Nov 15, 2021
Messages
161
The way to do that right is to not give your NIC an IP address and add it to a bridge (which you give the TrueNAS host IP to) and then join your additional services to the bridge rather than the NIC.
Interesting. Any chance there are instructions somewhere on how to accomplish that with TrueNAS?

Thanks,
Harry
 
Top