GarbageYard

daemonset_lb

Sep 12th, 2017
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.15 KB | None | 0 0
  1. [root@cent-gluster-workstation ~]# cat gitlab-service.yaml
  2. apiVersion: v1
  3. kind: Service
  4. metadata:
  5.   creationTimestamp: null
  6.   labels:
  7.     io.kompose.service: gitlab
  8.   name: gitlab
  9. spec:
  10.   type: NodePort
  11.   ports:
  12.   - name: http
  13.     port: 80
  14.     nodePort: 30080
  15.   - name: https
  16.     port: 443
  17.     nodePort: 30443
  18.   selector:
  19.     io.kompose.service: gitlab
  20. status:
  21.   loadBalancer: {}
  22.  
  23. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  24.  
  25. [root@cent-gluster-workstation ~]# cat loadbalancer-daemonset.yaml
  26. apiVersion: extensions/v1beta1
  27. kind: DaemonSet
  28. metadata:
  29.   name: daemonset-loadbalancer
  30. spec:
  31.   selector:
  32.     matchLabels:
  33.       name: loadbalancer
  34.   template:
  35.     metadata:
  36.       labels:
  37.         name: loadbalancer
  38.     spec:
  39.       hostNetwork: true
  40.       containers:
  41.       - image: gcr.io/google_containers/servicelb:0.4
  42.         imagePullPolicy: Always
  43.         name: haproxy
  44.         ports:
  45.        # All http services
  46.         - containerPort: 80
  47.           hostPort: 80
  48.           protocol: TCP
  49.         resources: {}
  50.  
  51. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Add Comment
Please, Sign In to add comment