Closed jasase closed 9 months ago
Syslog is flooded with this messages:
Feb 2 21:45:09 n7-k0s k0s[1492]: time="2024-02-02 21:45:09" level=info msg="E0202 21:45:09.113702 1536 available_controller.go:460] v1beta1.metrics.k8s.io failed with: failing or missing response from https://10.109.122.144:443/apis/metrics.k8s.io/v1beta1: Get \"https://10.109.122.144:443/apis/metrics.k8s.io/v1beta1\": No agent available" component=kube-apiserver stream=stderr
Feb 2 21:45:09 n7-k0s k0s[1492]: time="2024-02-02 21:45:09" level=info msg="E0202 21:45:09.119664 2187 server.go:588] \"Failed to get a backend\" err=\"No agent available\" dialID=8934187525441318029" component=konnectivity stream=stderr
Feb 2 21:45:09 n7-k0s k0s[1492]: time="2024-02-02 21:45:09" level=info msg="E0202 21:45:09.120097 1536 controller.go:146] Error updating APIService \"v1beta1.metrics.k8s.io\" with err: failed to download v1beta1.metrics.k8s.io: failed to retrieve openAPI spec, http error: ResponseCode: 503, Body: error trying to reach service: No agent available" component=kube-apiserver stream=stderr
Feb 2 21:45:09 n7-k0s k0s[1492]: time="2024-02-02 21:45:09" level=info msg=", Header: map[Content-Type:[text/plain; charset=utf-8] X-Content-Type-Options:[nosniff]]" component=kube-apiserver stream=stderr
Feb 2 21:45:09 n7-k0s k0s[1492]: time="2024-02-02 21:45:09" level=info msg="E0202 21:45:09.120641 2187 server.go:588] \"Failed to get a backend\" err=\"No agent available\" dialID=5563258231046833100" component=konnectivity stream=stderr
Feb 2 21:45:09 n7-k0s k0s[1492]: time="2024-02-02 21:45:09" level=info msg="E0202 21:45:09.120741 2187 server.go:588] \"Failed to get a backend\" err=\"No agent available\" dialID=860611279571955039" component=konnectivity stream=stderr
Feb 2 21:45:09 n7-k0s k0s[1492]: time="2024-02-02 21:45:09" level=info msg="E0202 21:45:09.120793 2187 server.go:588] \"Failed to get a backend\" err=\"No agent available\" dialID=1922455302067266170" component=konnectivity stream=stderr
Feb 2 21:45:09 n7-k0s k0s[1492]: time="2024-02-02 21:45:09" level=info msg="E0202 21:45:09.120933 2187 server.go:588] \"Failed to get a backend\" err=\"No agent available\" dialID=2609454271578293223" component=konnectivity stream=stderr
Feb 2 21:45:09 n7-k0s k0s[1492]: time="2024-02-02 21:45:09" level=info msg="E0202 21:45:09.121002 2187 server.go:588] \"Failed to get a backend\" err=\"No agent available\" dialID=7407836390960505655" component=konnectivity stream=stderr
Feb 2 21:45:09 n7-k0s k0s[1492]: time="2024-02-02 21:45:09" level=info msg="E0202 21:45:09.121031 2187 server.go:588] \"Failed to get a backend\" err=\"No agent available\" dialID=7344548162480458632" component=konnectivity stream=stderr
Do you have a load balancer in place? For HA setups (i.e. setups with more than one controller), you either need an external load balancer or enable node-local load balancing.
/xref k0sproject/k0sctl#475
Thanks for the hint. That solved my problem. But didn't found any hint that this Load-Balancer config is necessary for multi controller setups.
Where would you expect such a hint? The docs about control plane high availability state in their first sentence:
You can create high availability for the control plane by distributing the control plane across multiple nodes and installing a load balancer on top.
And further down on that page, in the "Load Balancer" section
Control plane high availability requires a tcp load balancer, which acts as a single point of contact to access the controllers.
Happy to add a note about that in other parts of the docs, as well. Ideally, k0sctl could warn about such things (see k0sproject/k0sctl#475).
Before creating an issue, make sure you've checked the following:
Platform
Version
v1.29.1+k0s.0
Sysinfo
`k0s sysinfo`
What happened?
Created a fresh 3 node cluster, but when I checking the apiservices, the one for metrics are not available. Checked with
kubectl get apiservice
Steps to reproduce
Config that was used to create cluster:
Expected behavior
All Kubernetes API Service should be available without limitations
Actual behavior
apiservices for metrics are not available
Screenshots and logs
No response
Additional context
No response