Created
January 17, 2023 12:09
-
-
Save ipedrazas/0813320a8a523083d7aa282a809ffabb to your computer and use it in GitHub Desktop.
Kubernetes DNS - Adding additional entries with hostAliases
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: hostaliases-pod | |
spec: | |
restartPolicy: Never | |
hostAliases: | |
- ip: "127.0.0.1" | |
hostnames: | |
- "foo.local" | |
- "bar.local" | |
- ip: "10.1.2.3" | |
hostnames: | |
- "foo.remote" | |
- "bar.remote" | |
containers: | |
- name: cat-hosts | |
image: busybox:1.28 | |
command: | |
- cat | |
args: | |
- "/etc/hosts" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment