2

Does k3s supports the ServiceTopology feature, and if so, how to enable it?

1 Answers1

2

Yes, but it's a feature-gate: Using CLI:

--kube-apiserver-arg feature-gates=ServiceTopology=true,... 

I have no firsthand experience with running it on k3s.

DarthHTTP
  • 406
  • 2
  • 7
  • Is there a way to verify that it has been properly applied? I've reinsyalled the ks3 server with `curl -sfL https://get.k3s.io | sh -s - --kube-apiserver-arg feature-gates=ServiceTopology=true,EndpointSlice=true` The unit file has been updated, but the feature does not seems to be enabled. The unit file now contains: `ExecStart=/usr/local/bin/k3s \ server \ '--kube-apiserver-arg' \ 'feature-gates=ServiceTopology=true,EndpointSlice=true' \ ` – Stephane Simard Feb 15 '21 at 13:45
  • given what it does, i'd dig for 2 things: #1. see API Server https://stackoverflow.com/questions/57449793/how-do-i-access-api-controller-config-in-lightweight-k3s; #2 Apply a configuration like https://kubernetes.io/docs/concepts/services-networking/service-topology/#only-node-local-endpoints to a netcat pod: https://github.com/k3s-io/k3s/issues/1982 – DarthHTTP Feb 15 '21 at 14:08