How to make UDP forwarding work for Graphite? #3178
-
With k3s running in Debian: apiVersion: helm.cattle.io/v1
kind: HelmChart
metadata:
name: graphite
namespace: kube-system
spec:
repo: https://kiwigrid.github.io
chart: graphite
targetNamespace: monitoring
valuesContent: |-
image:
repository: graphiteapp/graphite-statsd
tag: 1.1.10-5
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 8080
persistence:
enabled: true
size: 10Gi
ingress:
enabled: false
timeZone: UTC
statsd:
interface: UDP
---
apiVersion: v1
kind: Service
metadata:
name: graphite-statsd
namespace: monitoring
spec:
type: NodePort
ports:
- name: statsd
port: 8125
targetPort: 8125
nodePort: 30000
protocol: UDP
selector:
app.kubernetes.io/name: graphite
app.kubernetes.io/instance: graphite You will not be able to reach port 30000 from the host as per #3152 |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
Do you have working example with TCP port forwarding? |
Beta Was this translation helpful? Give feedback.
-
Looking in the code shows:
You can create a feature request issue to support this, and another one to document that this not supported now. |
Beta Was this translation helpful? Give feedback.
-
@balajiv113 maybe the protocol check is not needed now? |
Beta Was this translation helpful? Give feedback.
-
@brandonros you can try to apply this patch, build lima, and create a new instance using _output/bin/limactl. diff --git a/pkg/guestagent/kubernetesservice/kubernetesservice.go b/pkg/guestagent/kubernetesservice/kubernetesservice.go
index 45d21d46..0dd66308 100644
--- a/pkg/guestagent/kubernetesservice/kubernetesservice.go
+++ b/pkg/guestagent/kubernetesservice/kubernetesservice.go
@@ -131,11 +131,6 @@ func (s *ServiceWatcher) GetPorts() []Entry {
}
for _, portEntry := range service.Spec.Ports {
- if portEntry.Protocol != corev1.ProtocolTCP {
- // currently only TCP port can be forwarded
- continue
- }
-
var port int32
if service.Spec.Type == corev1.ServiceTypeNodePort {
port = portEntry.NodePort |
Beta Was this translation helpful? Give feedback.
Looking in the code shows:
lima/pkg/guestagent/kubernetesservice/kubernetesservice.go
Line 135 in 77204d8
You can create a feature request issue to support this, and another one to document that this not supported now.