update
This commit is contained in:
parent
47a50a0f7c
commit
cf30c5aeff
44
pod-and-service-dns.yaml
Normal file
44
pod-and-service-dns.yaml
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: default-subdomain
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
name: busybox
|
||||||
|
clusterIP: None
|
||||||
|
ports:
|
||||||
|
- name: foo # Actually, no port is needed.
|
||||||
|
port: 1234
|
||||||
|
targetPort: 1234
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
name: busybox1
|
||||||
|
labels:
|
||||||
|
name: busybox
|
||||||
|
spec:
|
||||||
|
hostname: busybox-1
|
||||||
|
subdomain: default-subdomain
|
||||||
|
containers:
|
||||||
|
- image: busybox:1.28
|
||||||
|
command:
|
||||||
|
- sleep
|
||||||
|
- "3600"
|
||||||
|
name: busybox
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
name: busybox2
|
||||||
|
labels:
|
||||||
|
name: busybox
|
||||||
|
spec:
|
||||||
|
hostname: busybox-2
|
||||||
|
subdomain: default-subdomain
|
||||||
|
containers:
|
||||||
|
- image: busybox:1.28
|
||||||
|
command:
|
||||||
|
- sleep
|
||||||
|
- "3600"
|
||||||
|
name: busybox
|
||||||
Loading…
Reference in New Issue
Block a user