Skip to content

Instantly share code, notes, and snippets.

@ssbostan
Created March 11, 2023 22:58
Show Gist options
  • Save ssbostan/a924655dd3f26d7face7de7a43bba7c2 to your computer and use it in GitHub Desktop.
Save ssbostan/a924655dd3f26d7face7de7a43bba7c2 to your computer and use it in GitHub Desktop.
Kubernetes Hacks and Tricks - #5 Pod DNS Policy and DNS Config options
apiVersion: v1
kind: Service
metadata:
name: test
spec:
type: ClusterIP
ports:
- port: 80
---
apiVersion: v1
kind: Pod
metadata:
name: test
spec:
dnsPolicy: None
dnsConfig:
nameservers:
- 8.8.8.8
searches:
- mydomain.com
- 20302040.xyz
containers:
- name: test
image: alpine:latest
command: ["sleep", "1000"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment