Closed whygyc closed 8 months ago
The error Get "https://127.0.0.1:6443/api/v1/nodes/10.0.2.15": dial tcp 127.0.0.1:6443: connect: connection refused
, which typically occurs when the kubelet is unavailable.
However, all commands in my environment are functioning properly, and I can create pods without datasets
successfully.
@whygyc it seems like the same problem with #3417
You can get more information and solution from my issue comment here https://github.com/fluid-cloudnative/fluid/issues/3417#issuecomment-1691532950
Thank you for your response. After investigating in the past few days, I found that the issue lies with csi-nodeplugin-fluid (the same error logs can be seen through kubectl logs -n fluid-system csi-nodeplugin-fluid-wr74l -c plugins). Within the plugins container, it is not possible to directly access the IP address 127.0.0.1 because it belongs to the internal network space of the container.
To resolve this, it is necessary to modify the DaemonSet/csi-nodeplugin-fluid by adding hostNetwork: true
and adjusting the port numbers for two listeners.
After making these changes, it will be able to correctly access 127.0.0.1 on the host, and pod creation will be successful.
# kubectl edit DaemonSet/csi-nodeplugin-fluid -n fluid-system
......
- --pprof-addr=:6061
- --metrics-addr=:8081
......
hostNetwork: true
......
Regarding
https://github.com/fluid-cloudnative/fluid/blob/05635698c0a0f8c3381a284240b56bcf0694f9d9/charts/fluid/fluid/values.yaml#L35hostNetwork: true
for DaemonSet/csi-nodeplugin-fluid
, I noticed that it seems to be configured in the YAML. However, I am not familiar with Helm, so I am unsure how to modify this configuration during Helm installation.
Thank you for the reminder. I did not notice the helm upgrade fluid --set csi.config.hostNetwork=true fluid/fluid
mentioned in the documentation. You are correct, but it seems that the documentation does not include the section on modifying ports. In my environment, using hostNetwork directly will lead to port conflicts. This is also an issue.
What is your environment(Kubernetes version, Fluid version, etc.)
I have been following this tutorial and attempting to use Fluid+JuiceFs in a single-node k8s environment. https://github.com/fluid-cloudnative/fluid/blob/master/docs/zh/samples/juicefs/juicefs_runtime.md I have successfully completed the previous steps, but I encountered an issue in the final step when creating the pod. It remains in the ContainerCreating state.
Here is my pod.yaml:
k8s node information:
If I remove the volume section in the sample-pod.yaml file, the pod can be created normally. I am not sure if this is related to Fluid. If there are any test methods, please let me know. I can confirm that the port number is correct as I can successfully access it using:
wget --header "Authorization: Bearer <token>" https://127.0.0.1:6443/api/v1/nodes/10.0.2.15
Any suggestions would be greatly appreciated. Thank you.