l7mp/stunner

Stunner service External IP still pending

Closed this issue · 5 comments

Hi,

I try to install stunner. I finish installation and configuration but stunner pod still pending.

$ kubectl get pod -n stunner
NAME                       READY   STATUS    RESTARTS   AGE
stunner-7ff4875b47-6dtzt   0/2     Pending   0          12m
$ kubectl get service -n stunner
NAME      TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE
stunner   ClusterIP   10.245.91.141   <none>        3478/UDP   13m

There is some way how to debug?

Hi @krajcikondra ,

This can happen when your k8ss cluster does not support LoadBalancer services on UDP ports.

First thing to check: Do you use self-managed or managed kubernetes? If it is managed, does the provider support UDP load balancers? If it is managed, extra annotations might be required, see #32

If it is self-managed, you can install a load balancer (e.g., MetalLB or in case of minikube, minikube tunnel). As a last resort you can use stunner via its NodePort.

Hope this helps your troubleshooting.

I have managed kubernetes cluster on digital ocean and UDP load balancers are supported. But for UDP load balancer is needed implementation of health check.

https://docs.digitalocean.com/products/kubernetes/how-to/configure-load-balancers/#health-checks

I cannot say I fully understand what exactly should I do. After add two lines from documentation is load balancer status still Pending.

apiVersion: v1
kind: Service
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"gateway.networking.k8s.io/v1alpha2","kind":"Gateway","metadata":{"annotations":{},"name":"udp-gateway","namespace":"stunner"},"spec":{"gatewayClassName":"stunner-gatewayclass","listeners":[{"name":"udp-listener","port":3478,"protocol":"UDP"}]}}
    stunner.l7mp.io/related-gateway-name: stunner/udp-gateway
    # I added following two lines
    service.beta.kubernetes.io/do-loadbalancer-healthcheck-port: "80"
    service.beta.kubernetes.io/do-loadbalancer-healthcheck-protocol: "http"
  finalizers:
  - service.kubernetes.io/load-balancer-cleanup
  labels:
    app: stunner
    stunner.l7mp.io/owned-by: stunner
  name: udp-gateway
  namespace: stunner
  ownerReferences:
  - apiVersion: gateway.networking.k8s.io/v1alpha2
    kind: Gateway
    name: udp-gateway
    uid: f8481e46-507a-4c6d-8102-3c31f2ed4c45
spec:
  allocateLoadBalancerNodePorts: true
  clusterIP: 10.245.215.188
  clusterIPs:
  - 10.245.215.188
  externalTrafficPolicy: Cluster
  internalTrafficPolicy: Cluster
  ipFamilies:
  - IPv4
  ipFamilyPolicy: SingleStack
  ports:
  - name: udp-gateway-udp
    nodePort: 31780
    port: 3478
    protocol: UDP
    targetPort: 3478
  selector:
    app: stunner
  sessionAffinity: None
  type: LoadBalancer
status:
  loadBalancer: {}

Can somebody help what is next step?

Good news is that STUNner "supports" Digital Ocean.

This is the default config for the built-in STUNner healthcheck service:

service.beta.kubernetes.io/do-loadbalancer-healthcheck-port: "8086"
service.beta.kubernetes.io/do-loadbalancer-healthcheck-protocol: "http"
service.beta.kubernetes.io/do-loadbalancer-healthcheck-path: "/live"

Can you please try to apply these annotations instead of the default DO-recommended lines?

Just to give more context, the annotations come from here: https://github.com/l7mp/stunner/blob/main/docs/GATEWAY.md#gateway

Thanks, now stunner is running :-)