mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 02:33:14 -04:00
plugin/kubernetes: Mention remote IP requirement for autopath and metadata in README (#3876)
* mention remote IP requirement for autopath and metadata Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * remove whitespace Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
This commit is contained in:
@@ -173,7 +173,8 @@ upstreamNameservers: |
|
||||
|
||||
The *kubernetes* plugin can be used in conjunction with the *autopath* plugin. Using this
|
||||
feature enables server-side domain search path completion in Kubernetes clusters. Note: `pods` must
|
||||
be set to `verified` for this to function properly.
|
||||
be set to `verified` for this to function properly. Furthermore, the remote IP address in the DNS
|
||||
packet received by CoreDNS must be the IP address of the Pod that sent the request.
|
||||
|
||||
cluster.local {
|
||||
autopath @kubernetes
|
||||
@@ -206,14 +207,20 @@ or the word "any"), then that label will match all values. The labels that acce
|
||||
The kubernetes plugin will publish the following metadata, if the *metadata*
|
||||
plugin is also enabled:
|
||||
|
||||
* kubernetes/endpoint: the endpoint name in the query
|
||||
* kubernetes/kind: the resource kind (pod or svc) in the query
|
||||
* kubernetes/namespace: the namespace in the query
|
||||
* kubernetes/port-name: the port name in an SRV query
|
||||
* kubernetes/protocol: the protocol in an SRV query
|
||||
* kubernetes/service: the service name in the query
|
||||
* kubernetes/client-namespace: the client pod's namespace, if `pods verified` mode is enabled
|
||||
* kubernetes/client-pod-name: the client pod's name, if `pods verified` mode is enabled
|
||||
* `kubernetes/endpoint`: the endpoint name in the query
|
||||
* `kubernetes/kind`: the resource kind (pod or svc) in the query
|
||||
* `kubernetes/namespace`: the namespace in the query
|
||||
* `kubernetes/port-name`: the port name in an SRV query
|
||||
* `kubernetes/protocol`: the protocol in an SRV query
|
||||
* `kubernetes/service`: the service name in the query
|
||||
* `kubernetes/client-namespace`: the client pod's namespace (see requirements below)
|
||||
* `kubernetes/client-pod-name`: the client pod's name (see requirements below)
|
||||
|
||||
The `kubernetes/client-namespace` and `kubernetes/client-pod-name` metadata work by reconciling the
|
||||
client IP address in the DNS request packet to a known pod IP address. Therefore the following is required:
|
||||
* `pods verified` mode must be enabled
|
||||
* the remote IP address in the DNS packet received by CoreDNS must be the IP address
|
||||
of the Pod that sent the request.
|
||||
|
||||
## Metrics
|
||||
|
||||
|
||||
Reference in New Issue
Block a user