SHARE
TWEET

Untitled

a guest Jun 18th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ---
  2. apiVersion: apps/v1
  3. kind: StatefulSet
  4. metadata:
  5.   name: busy
  6. spec:
  7.   serviceName: busy
  8.   selector:
  9.     matchLabels:
  10.       app: busy
  11.   replicas: 3
  12.   template:
  13.     metadata:
  14.       name: busy
  15.       labels:
  16.         app: busy
  17.     spec:
  18.       containers:
  19.         - name: busy
  20.           image: busybox:1.28
  21.           imagePullPolicy: IfNotPresent
  22.           command:
  23.             - sleep
  24.             - "3600"
  25.       restartPolicy: Always
  26.      
  27. ---
  28. kind: Service
  29. apiVersion: v1
  30. metadata:
  31.   name: busy-headless
  32. spec:
  33.   clusterIP: None
  34.   publishNotReadyAddresses: true
  35.   selector:
  36.     app: busy
  37.      
  38. 17:00 $ kubectl exec -ti busy-0 -- nslookup busy-headless.default.svc.cluster.local
  39. Server:    10.233.0.3
  40. Address 1: 10.233.0.3 coredns.kube-system.svc.cluster.local
  41.  
  42. Name:      busy-headless.default.svc.cluster.local
  43. Address 1: 10.233.67.10 10-233-67-10.busy-headless.default.svc.cluster.local
  44. Address 2: 10.233.68.27 10-233-68-27.busy-headless.default.svc.cluster.local
  45. Address 3: 10.233.68.26 10-233-68-26.busy-headless.default.svc.cluster.local
  46. Address 4: 10.233.69.11 busy-0.busy.default.svc.cluster.local
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top