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

Validate ports in PreInitChecks #815

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

eaudetcobello
Copy link
Contributor

@eaudetcobello eaudetcobello commented Nov 19, 2024

This function runs before any of the k8s binaries are started, it's the right place to validate that the api-server, kubelet, etc. ports are available.

Note: containerd doesn't seem to use a consistent port, which complicates checking if it's port is available.
Note: When a port is in use, I sometimes get a The error was: failed to POST /k8sd/cluster: Post "http://control.socket/1.0/k8sd/cluster": EOF error before the validation happens. I'm investigating this.

this check happens before any of the k8s binaries are started,
it's the right place to validate that the api-server, kubelet,
etc. ports are available.
ports := []int{
config.APIServer.GetSecurePort(), // kubeAPIServerPort
config.Datastore.GetK8sDqlitePort(), // k8sDqlitePort
10248, // kubeletHealthzPort
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these ports can be set in the service extra args. We need to check from there for the right values.

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

Successfully merging this pull request may close these issues.

2 participants