0

How (if any) it is possible to add options timeout to /etc/resolv.conf in docker container running in Kubernetes cluster?

The file is generated, so it's not possible to do that in Dockerfile. On the other way, it's owned by root, so it's not possible to do that in shell script by starting container either.

I guess it belongs to cluster configuration...

1 Answers1

2

You can use this:

spec:
  containers:
  - name: test
    image: nginx
    dnsConfig:
      options:
      - name: timeout
        value: "2"

Read more on this in kubernetes documentation

Matt
  • 548
  • 3
  • 8