Hi I use embeded Traefik into K3s.
I have a grpc service as a K3s deployment / service
To publish it, I created an ingressroute:
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: ingressroute
spec:
entryPoints:
- web
routes:
- match: Host(`hostname`)
kind: Rule
services:
- name: mysvc
port: 3051
Service:
apiVersion: v1
kind: Service
metadata:
name: service
labels:
{{- include "mychart_chart.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.httpport }}
targetPort: http
protocol: TCP
name: http
- port: {{ .Values.service.grpcport }}
targetPort: grpc
protocol: TCP
name: grpc
- port: {{ .Values.service.ftpport }}
targetPort: ftp
protocol: TCP
name: ftp
- port: {{ .Values.service.metricport }}
targetPort: metrics
protocol: TCP
name: metrics
selector:
{{- include "mychart_chart.selectorLabels" . | nindent 4 }}
My grpc service doesn't support tls yet, so I don't need a certificate yet.
In local, I get no issue, i can access to my grpc api.
From my hostname, I get some issue with refused connection.
grpcurl -plaintext hostname:80 MyRepo/Service
gives Failed to dial target "hostname" dial tcp: lookup hostname on [::1]:53 read udp [::1]:38613->[::1]:53 read: connection refused
I miss something with Traefik configuration ?