ori-edge / k8s_gateway

A CoreDNS plugin to resolve all types of external Kubernetes resources
Apache License 2.0
308 stars 65 forks source link

Pod doesn't start when forward plugin is configured #198

Closed sfenzke closed 10 months ago

sfenzke commented 1 year ago

I had the forward plugin configured like thist:

extraZonePlugins:
  - name: forward
    parameters: . 192 168 178.2

This lead to the pod not starting anymore. The issue seems to be existing since Chart version 2.0.0. Am I doing something wrong or is there an issue wit the service?

networkop commented 1 year ago

what is the error you're seeing? I can see you've misspelled the IP "192.168.178.2", could this be the issue?

sfenzke commented 1 year ago

Hello I just confirmed the missplelled IP is not in my configuration. I actually don't know where this mistake originates from.. The error I am seeing is that the pod never reaches the ready state and starts to ansewer to DNS Requests. Unfortunatley there is no error message. The log outout of the pod is like this:

[INFO] plugin/k8s_gateway: Building k8s_gateway controller
[INFO] plugin/k8s_gateway: GatewayAPI CRDs are not found. Not syncing GatewayAPI resources.
[INFO] plugin/k8s_gateway: VirtualServer CRDs are not found. Not syncing VirtualServer resources.
[INFO] plugin/k8s_gateway: Starting k8s_gateway controller
[INFO] plugin/k8s_gateway: Waiting for controllers to sync
.:1053
CoreDNS-1.10.0+k8s_gateway-0.3.3
linux/arm64, go1.19.5, bce972a
[INFO] plugin/k8s_gateway: Synced all required resources

I removed the extraZonesPlugin configuration and the pod started up and began handling DNS requests.

networkop commented 1 year ago

ok, got it. @sfenzke can you please include your values file? I'll test it today/tomorrow

sfenzke commented 1 year ago

Hi sorry for the late reply. Here is the content of my values file:

domain: "sfenzke-home.de"

extraZonePlugins:
  - name: forward
    parameters: . 192.168.178.2

service:
  type: LoadBalancer
  port: 53
  annotations: {metallb.universe.tf/address-pool: dns-pool}
  externalIPs:
    - 192.168.6.2
networkop commented 1 year ago

cool, will test in a couple of days and push the fix

networkop commented 1 year ago

I think i've found the issue. Can you retest with the following values file:

domain: "sfenzke-home.de"

extraZonePlugins:
  - name: forward
    parameters: . 192.168.178.2
  - name: ready

service:
  type: LoadBalancer
  port: 53
  annotations: {metallb.universe.tf/address-pool: dns-pool}
  externalIPs:
    - 192.168.6.2
sfenzke commented 1 year ago

This worked. I wasn't awre you need to specify the ready plugin in coreDNS. Thank you very much.