-
Notifications
You must be signed in to change notification settings - Fork 839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Besu always needs cluster level permissions for Kubernetes NAT manager on GKE #5002
Comments
@joshuafernandes - Any opinion here? |
Hi @non-fungible-nelson yes this is an issue and I believe tied to how we do things with K8S RBAC (ie Besu doesn't respect RBAC). The NAT manager works perfectly fine as long as cluster wide RBAC is disabled, but when it is enabled (most cases & this should be the norm to be honest) the permissions it requires are too wide. Have discussed with @matkt a while ago but priorities changed I believe https://github.com/hyperledger/besu/blob/main/nat/src/main/java/org/hyperledger/besu/nat/kubernetes/KubernetesNatManager.java#L87 should be limited to single namespace imho and we pass the namespace in as another cli arg. In the K8S repo I've turned NAT manager off altogether because of this and prefer to remain secure and manually pass in the addresses via DNS |
Thanks for this - leaving open for now. Might make a docs change regarding this for your advice? @alexandratran ping me if you think this makes sense to open a ticket with in besu docs. |
How did you use DNS without the NAT manager and cluster level permissions? I went through your DNS setup and I have the same configuration, but I still get the following issues: When I try:
|
Hi @snigdha920 it has been a good while since I used it last and maybe code is changed now, but the two should be treated seperate. In the setup I had in the repo, Besu's NAT manager would fail and then it would lookup things via DNS (more so given it was told what the service name was, it didn't need to do the whole lookup). If this has now changed and the DNS lookup isn't working, then this should be fixed @non-fungible-nelson - effectively Besu in K8S will not work |
Yes, it doesn't work even if I provide the service name. It tries to list services across all namespaces, which causes the permission issue. So effectively besu in k8s doesn't work (without the cluster level permissions) |
@snigdha920 It has been long time since the PR raised. I was checking on this and there was a question whether NAT is required any more? Apparently NAT is required to communicate cross clusters. We could use Besu for public network (mainnet,testnet) following solution setting nat=NONE.
Please refer to the solution in the github repo ethereum-helm-charts. This is the initContainer getting the public ip of the node |
closed due to inactivity |
Description
besu/nat/src/main/java/org/hyperledger/besu/nat/kubernetes/KubernetesNatManager.java
Line 87 in 9eb3283
besu
deployment for it to be able to scan all the namespacesNONE
, the enode does not have the correct public IP address anymore, instead it is0.0.0.0
What we need is the NAT manager to work without the need of cluster level permissions on GKE.
Perhaps a fallback to just checking in the local namespace (i.e the namespace of the besu deployment) before throwing the error?
Acceptance Criteria
Steps to Reproduce (Bug)
besu/nat/src/main/java/org/hyperledger/besu/nat/kubernetes/KubernetesNatManager.java
Line 97 in 9eb3283
and falls back to
NONE
.3. The enode url of the node has
0.0.0.0
as the public IPExpected behavior: [What you expect to happen]
If searching for the service across all namespaces fails, it should look for the service in the local namespace before falling back to
NONE
.Actual behavior: [What actually happens]
If searching for the service across all namespaces fails, it errors out, and falls back to
NONE
.Frequency: [What percentage of the time does it occur?]
100%
Versions (Add all that apply)
besu --version
]java -version
]cat /etc/*release
]uname -a
]vmware -v
]docker version
]Smart contract information (If you're reporting an issue arising from deploying or calling a smart contract, please supply related information)
N/A
Additional Information (Add any of the following or anything else that may be relevant)
N/A
The text was updated successfully, but these errors were encountered: