发表于 2018-9-16 06:11:52

手动搭建Kubernetes1.8高可用集群(6)calico-BravePro

---  # This manifest installs the calico/node container, as well
  # as the Calico CNI plugins and network config on
  # each master and worker node in a Kubernetes cluster.
  kind: DaemonSet
  apiVersion: extensions/v1beta1
  metadata:
  name: calico-node
  namespace: kube-system
  labels:
  k8s-app: calico-node
  spec:
  selector:
  matchLabels:
  k8s-app: calico-node
  template:
  metadata:
  labels:
  k8s-app: calico-node
  spec:
  hostNetwork: true
  serviceAccountName: calico-node
  tolerations:
  - effect: NoSchedule
  operator: Exists
  containers:
  # Runs calico/node container on each Kubernetes node.This
  # container programs network policy and routes on each
  # host.
  - name: calico-node
  image: quay.io/calico/node:v2.5.0
  env:
  # The location of the Calico etcd cluster.
  - name: ETCD_ENDPOINTS
  valueFrom:
  configMapKeyRef:
  name: calico-config
  key: etcd_endpoints
  # Choose the backend to use.
  - name: CALICO_NETWORKING_BACKEND
  valueFrom:
  configMapKeyRef:
  name: calico-config
  key: calico_backend

  # Cluster type to>  - name: CLUSTER_TYPE
  valueFrom:
  configMapKeyRef:
  name: calico-config
  key: cluster_type
  # Disable file logging so `kubectl logs` works.
  - name: CALICO_DISABLE_FILE_LOGGING
  value: "true"
  # Set Felix endpoint to host default action to ACCEPT.
  - name: FELIX_DEFAULTENDPOINTTOHOSTACTION
  value: "RETURN"
  # should be set in etcd before deployment
  #            # Configure the IP Pool from which Pod IPs will be chosen.
  #            - name: CALICO_IPV4POOL_CIDR
  #            value: "192.168.0.0/16"
  #            - name: CALICO_IPV4POOL_IPIP
  #            value: "always"
  # Disable IPv6 on Kubernetes.
  - name: FELIX_IPV6SUPPORT
  value: "false"
  # Set Felix logging to "info"
  - name: FELIX_LOGSEVERITYSCREEN
  value: "info"
  # Disable autocreation of pools
  - name: CALICO_NO_DEFAULT_POOLS
  value: "true"
  # Enable libnetwork
  - name: CALICO_LIBNETWORK_ENABLED
  value: "true"
  # Set MTU for tunnel device used if ipip is enabled
  - name: FELIX_PROMETHEUSMETRICSENABLED
  value: "false"
  - name: FELIX_PROMETHEUSMETRICSPORT
  value: "9091"
  - name: FELIX_PROMETHEUSGOMETRICSENABLED
  value: "true"
  - name: FELIX_PROMETHEUSPROCESSMETRICSENABLED
  value: "true"
  # Location of the CA certificate for etcd.
  - name: ETCD_CA_CERT_FILE
  valueFrom:
  configMapKeyRef:
  name: calico-config
  key: etcd_ca
  # Location of the client key for etcd.
  - name: ETCD_KEY_FILE
  valueFrom:
  configMapKeyRef:
  name: calico-config
  key: etcd_key
  # Location of the client certificate for etcd.
  - name: ETCD_CERT_FILE
  valueFrom:
  configMapKeyRef:
  name: calico-config
  key: etcd_cert
  - name: IP
  valueFrom:
  fieldRef:
  fieldPath: status.hostIP
  - name: NODENAME
  valueFrom:
  fieldRef:
  fieldPath: spec.nodeName
  - name: FELIX_HEALTHENABLED
  value: "true"
  - name: FELIX_IGNORELOOSERPF
  value: "False"
  securityContext:
  privileged: true
  resources:
  limits:
  cpu: 300m
  memory: 500M
  requests:
  cpu: 150m
  memory: 64M
  livenessProbe:
  httpGet:
  path: /liveness
  port: 9099
  periodSeconds: 10
  initialDelaySeconds: 10
  failureThreshold: 6
  readinessProbe:
  httpGet:
  path: /readiness
  port: 9099
  periodSeconds: 10
  volumeMounts:
  - mountPath: /lib/modules
  name: lib-modules
  readOnly: true
  - mountPath: /var/run/calico
  name: var-run-calico
  readOnly: false
  - mountPath: /calico-secrets
  name: etcd-certs
  volumes:
  # Used by calico/node.
  - name: lib-modules
  hostPath:
  path: /lib/modules
  - name: var-run-calico
  hostPath:
  path: /var/run/calico
  # Used to install CNI.
  - name: cni-bin-dir
  hostPath:
  path: /opt/cni/bin
  - name: cni-net-dir
  hostPath:
  path: /etc/cni/net.d
  # Mount in the etcd TLS secrets.
  - name: etcd-certs
  hostPath:
  path: "/etc/calico/certs"
  updateStrategy:
  rollingUpdate:
  maxUnavailable: 20%
  type: RollingUpdate


页: [1]
查看完整版本: 手动搭建Kubernetes1.8高可用集群(6)calico-BravePro