Skip to content

Instantly share code, notes, and snippets.

@ipedrazas
Created January 17, 2023 12:09
Show Gist options
  • Select an option

  • Save ipedrazas/0813320a8a523083d7aa282a809ffabb to your computer and use it in GitHub Desktop.

Select an option

Save ipedrazas/0813320a8a523083d7aa282a809ffabb to your computer and use it in GitHub Desktop.

Revisions

  1. ipedrazas created this gist Jan 17, 2023.
    22 changes: 22 additions & 0 deletions pod.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    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"