kubernetes hostAliases 的示例:
apiVersion: v1
kind: Pod
metadata:
name: hostAliases
spec:
containers:
- name: hostAliases
image: nginx:latest
hostAliases:
- ip: "10.10.1.100"
hostnames:
- "docker.local.io" # 内网域名
- ip: "10.10.1.101"
hostnames:
- "gitlab.local.io" # 内网域名
- ip: "10.10.1.102"
hostnames:
- "jenkins.local.io" # 内网域名