Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- apiVersion: apps/v1
- kind: StatefulSet
- metadata:
- name: busy
- spec:
- serviceName: busy
- selector:
- matchLabels:
- app: busy
- replicas: 3
- template:
- metadata:
- name: busy
- labels:
- app: busy
- spec:
- containers:
- - name: busy
- image: busybox:1.28
- imagePullPolicy: IfNotPresent
- command:
- - sleep
- - "3600"
- restartPolicy: Always
- ---
- kind: Service
- apiVersion: v1
- metadata:
- name: busy-headless
- spec:
- clusterIP: None
- publishNotReadyAddresses: true
- selector:
- app: busy
- 17:00 $ kubectl exec -ti busy-0 -- nslookup busy-headless.default.svc.cluster.local
- Server: 10.233.0.3
- Address 1: 10.233.0.3 coredns.kube-system.svc.cluster.local
- Name: busy-headless.default.svc.cluster.local
- Address 1: 10.233.67.10 10-233-67-10.busy-headless.default.svc.cluster.local
- Address 2: 10.233.68.27 10-233-68-27.busy-headless.default.svc.cluster.local
- Address 3: 10.233.68.26 10-233-68-26.busy-headless.default.svc.cluster.local
- Address 4: 10.233.69.11 busy-0.busy.default.svc.cluster.local
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement