daily pastebin goal
7%
SHARE
TWEET

Untitled

a guest Mar 17th, 2018 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ---
  2. kind: ClusterRole
  3. apiVersion: rbac.authorization.k8s.io/v1beta1
  4. metadata:
  5.   name: flannel
  6. rules:
  7.   - apiGroups:
  8.       - ""
  9.     resources:
  10.       - pods
  11.     verbs:
  12.       - get
  13.   - apiGroups:
  14.       - ""
  15.     resources:
  16.       - nodes
  17.     verbs:
  18.       - list
  19.       - watch
  20.   - apiGroups:
  21.       - ""
  22.     resources:
  23.       - nodes/status
  24.     verbs:
  25.       - patch
  26. ---
  27. kind: ClusterRoleBinding
  28. apiVersion: rbac.authorization.k8s.io/v1beta1
  29. metadata:
  30.   name: flannel
  31. roleRef:
  32.   apiGroup: rbac.authorization.k8s.io
  33.   kind: ClusterRole
  34.   name: flannel
  35. subjects:
  36. - kind: ServiceAccount
  37.   name: flannel
  38.   namespace: kube-system
  39. ---
  40. apiVersion: v1
  41. kind: ServiceAccount
  42. metadata:
  43.   name: flannel
  44.   namespace: kube-system
  45. ---
  46. kind: ConfigMap
  47. apiVersion: v1
  48. metadata:
  49.   name: kube-flannel-cfg
  50.   namespace: kube-system
  51.   labels:
  52.     tier: node
  53.     app: flannel
  54. data:
  55.   cni-conf.json: |
  56.     {
  57.       "name": "cbr0",
  58.       "plugins": [
  59.         {
  60.           "type": "flannel",
  61.           "delegate": {
  62.             "hairpinMode": true,
  63.             "isDefaultGateway": true
  64.           }
  65.         },
  66.         {
  67.           "type": "portmap",
  68.           "capabilities": {
  69.             "portMappings": true
  70.           }
  71.         }
  72.       ]
  73.     }
  74.   net-conf.json: |
  75.     {
  76.       "Network": "10.244.0.0/16",
  77.       "Backend": {
  78.         "Type": "host-gw"
  79.       }
  80.     }
  81. ---
  82. apiVersion: extensions/v1beta1
  83. kind: DaemonSet
  84. metadata:
  85.   name: kube-flannel-ds
  86.   namespace: kube-system
  87.   labels:
  88.     tier: node
  89.     app: flannel
  90. spec:
  91.   template:
  92.     metadata:
  93.       labels:
  94.         tier: node
  95.         app: flannel
  96.     spec:
  97.       hostNetwork: true
  98.       nodeSelector:
  99.         beta.kubernetes.io/arch: amd64
  100.       tolerations:
  101.       - key: node-role.kubernetes.io/master
  102.         operator: Exists
  103.         effect: NoSchedule
  104.       serviceAccountName: flannel
  105.       initContainers:
  106.       - name: install-cni
  107.         image: quay.io/coreos/flannel:v0.10.0-amd64
  108.         command:
  109.         - cp
  110.         args:
  111.         - -f
  112.         - /etc/kube-flannel/cni-conf.json
  113.         - /etc/cni/net.d/10-flannel.conflist
  114.         volumeMounts:
  115.         - name: cni
  116.           mountPath: /etc/cni/net.d
  117.         - name: flannel-cfg
  118.           mountPath: /etc/kube-flannel/
  119.       containers:
  120.       - name: kube-flannel
  121.         image: quay.io/coreos/flannel:v0.10.0-amd64
  122.         command:
  123.         - /opt/bin/flanneld
  124.         args:
  125.         - --ip-masq
  126.         - --iface=backplane1
  127.         - --kube-subnet-mgr
  128.         resources:
  129.           requests:
  130.             cpu: "100m"
  131.             memory: "50Mi"
  132.           limits:
  133.             cpu: "100m"
  134.             memory: "50Mi"
  135.         securityContext:
  136.           privileged: true
  137.         env:
  138.         - name: POD_NAME
  139.           valueFrom:
  140.             fieldRef:
  141.               fieldPath: metadata.name
  142.         - name: POD_NAMESPACE
  143.           valueFrom:
  144.             fieldRef:
  145.               fieldPath: metadata.namespace
  146.         volumeMounts:
  147.         - name: run
  148.           mountPath: /run
  149.         - name: flannel-cfg
  150.           mountPath: /etc/kube-flannel/
  151.       volumes:
  152.         - name: run
  153.           hostPath:
  154.             path: /run
  155.         - name: cni
  156.           hostPath:
  157.             path: /etc/cni/net.d
  158.         - name: flannel-cfg
  159.           configMap:
  160.             name: kube-flannel-cfg
RAW Paste Data
Top