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

Support HTTP(s) healthcheck for K8s API server NLB #16422

Open
jaininshah9 opened this issue Mar 24, 2024 · 3 comments
Open

Support HTTP(s) healthcheck for K8s API server NLB #16422

jaininshah9 opened this issue Mar 24, 2024 · 3 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@jaininshah9
Copy link

/kind feature

1. Describe IN DETAIL the feature/behavior/change you would like to see.
We have a use-case of supporting HTTP/HTTPS health checks (that gives different HTTP Codes) for the K8s api server NLB created via kOps when a cluster is created. Currently from code, I see we only support TCP healthchecks (since that's the default for NLB)

Can we have a optional setting in spec.api.loadbalancer where we can override the TargetGroup healthchecks options?
(ref: https://docs.aws.amazon.com/elasticloadbalancing/latest/network/target-group-health-checks.html#health-check-settings)

2. Feel free to provide a design supporting your feature request.
This should be fairly straightforward to change for AWS (since I am familiar with AWS, I can speak on it). I can submit a PR if this is okay to do.

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Mar 24, 2024
@hakman
Copy link
Member

hakman commented Mar 30, 2024

Hi @jaininshah9, could you explain more your use case?
@rifelpet, do you remember why we used TCP healthcheck for NLB instead of pointing it to wellknownports.KubeAPIServerHealthCheck?
I think this is what is used for GCE:

healthCheck := &gcetasks.HTTPHealthcheck{
Name: s(b.NameForHealthcheck("api")),
Port: i64(wellknownports.KubeAPIServerHealthCheck),
RequestPath: s("/healthz"),
Lifecycle: b.Lifecycle,
}
c.AddTask(healthCheck)

@rifelpet
Copy link
Member

rifelpet commented Mar 30, 2024

I'm guessing we used TCP healthchecks on the traffic port for NLB because it is the default for TCP target groups.

We could consider switching to HTTPS targeting the health check port and path to be consistent with GCE

@jaininshah9
Copy link
Author

Yeah, for us we wanted better support for HTTP codes to make sure during the api-server rolling restart, we have more control over the health status of the server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

4 participants