Skip to content
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

Kubernetes API lockdown after clustering #7887

Closed
exalate-issue-sync bot opened this issue May 11, 2023 · 1 comment
Closed

Kubernetes API lockdown after clustering #7887

exalate-issue-sync bot opened this issue May 11, 2023 · 1 comment

Comments

@exalate-issue-sync
Copy link

When H2O is deployed in Kubernetes environment, only the leader node should be exposed. This is currently done via a mechanism where H2O makes itself signal "unready" state to the K8S service, except for the leader node. Yet the client APIs on HTTP protocol still work on each node, making it easy to be mistakenly called by the client - which may happen in cases where H2O is somehow wrongly exposed in K8S environment (e.g. wrong type of service used).

Possible solutions are:

Disable client API of all nodes except for leader node once the clustering is done.

Throw 4xx HTTP error, e.g. 403 - Forbidden with a meaningful error message informing the user about using wrongly set-up cluster.

Other objectives are:

Investigate to what extent can H2O diagnose the K8S setup it is spawned in - mainly the type of service used. This could potentially be a problem with roles and priviliges configuration and may not be enabled on all K8S implementations. What we could do is to at least attempt to perform such checks (provided they make sense) and warn the user about not being able to perform them - this does not prevent the clustering to happen.

Consult with Sparkling Water [~accountid:5c9943ec3a5542225fedb6b9] if a flag to enable the APIs is required. Or could be implemented otherwise - the APIs are only shut down when the flag is present, which changes the behavior of the above-described.

@h2o-ops
Copy link
Collaborator

h2o-ops commented May 14, 2023

JIRA Issue Migration Info

Jira Issue: PUBDEV-7753
Assignee: Pavel Pscheidl
Reporter: Pavel Pscheidl
State: Resolved
Fix Version: 3.32.0.3
Attachments: N/A
Development PRs: Available

Linked PRs from JIRA

#4917
#5134
h2oai/sparkling-water#2397

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant