https://rancher.com/ logo
#k3s
Title
# k3s
e

enough-carpet-20915

12/04/2022, 6:44 PM
So I'm trying to add entrypoints to the automatically installed traefik in k3s. I'm having issues, however. If I apply this:
Copy code
apiVersion: <http://helm.cattle.io/v1|helm.cattle.io/v1>
kind: HelmChartConfig
metadata:
  name: traefik
  namespace: kube-system
spec:
  valuesContent: |-
    additionalArguments:
      - "--entrypoints.minecraft.address=:25565/tcp"
    ports:
    - containerPort: 25565
      name: minecraft
      protocol: TCP
I get this error from the helm-install-traefik-$foo pod:
Copy code
Error: UPGRADE FAILED: template: traefik/templates/service.yaml:10:27: executing "traefik/templates/service.yaml" at <$name>: wrong type for value; expected string; got int
What am I doing wrong here?
c

creamy-pencil-82913

12/04/2022, 6:47 PM
It’s a map, not a list
Copy code
ports:
      minecraft:
        port: 25565
        exposedPort: 25565
        expose: true
        protocol: TCP
It looks like you’re trying to set that to something you’d put in a pod spec, but that’s not what it is. Did you look at the chart values? https://github.com/traefik/traefik-helm-chart/blob/master/traefik/values.yaml#L473-L478
For stuff like this, where its just bare TCP or UDP and you aren’t doing any http request routing or anything, I really don’t see the point in exposing it via Traefik instead of just setting up a TCP LoadBalancer service. Its just a bunch of extra configuration and latency with no value add.
e

enough-carpet-20915

12/04/2022, 7:02 PM
I was planning on running mc-router, but I guess if I do NodePort with that the LB will just pick up whichever node is running mc-router and never set it to more than 1 replica
13 Views