首页 > 其他分享 >flannel v0.20.2版内容

flannel v0.20.2版内容

时间:2022-12-28 17:55:56浏览次数:38  
标签:kube name metadata 内容 io flannel v0.20 cni

地址

https://github.com/flannel-io/flannel/
kubectl apply -f https://raw.githubusercontent.com/flannel-io/flannel/v0.20.2/Documentation/kube-flannel.yml

kube-flannel.yml内容

root@master1:~# cat kube-flannel.yml
---
kind: Namespace
apiVersion: v1
metadata:
  name: kube-flannel
  labels:
    pod-security.kubernetes.io/enforce: privileged
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: flannel
rules:
- apiGroups:
  - ""
  resources:
  - pods
  verbs:
  - get
- apiGroups:
  - ""
  resources:
  - nodes
  verbs:
  - get
  - list
  - watch
- apiGroups:
  - ""
  resources:
  - nodes/status
  verbs:
  - patch
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: flannel
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: flannel
subjects:
- kind: ServiceAccount
  name: flannel
  namespace: kube-flannel
---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: flannel
  namespace: kube-flannel
---
kind: ConfigMap
apiVersion: v1
metadata:
  name: kube-flannel-cfg
  namespace: kube-flannel
  labels:
    tier: node
    app: flannel
data:
  cni-conf.json: |
    {   
      "name": "cbr0",
      "cniVersion": "0.3.1",
      "plugins": [
        {   
          "type": "flannel",
          "delegate": {
            "hairpinMode": true,
            "isDefaultGateway": true
          }
        },  
        {
          "type": "portmap",
          "capabilities": {
            "portMappings": true
          }
        }
      ]
    }
  net-conf.json: |
    {
      "Network": "10.244.0.0/16",
      "Backend": {
        "Type": "vxlan"
      }
    }
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: kube-flannel-ds
  namespace: kube-flannel
  labels:
    tier: node
    app: flannel
spec:
  selector:
    matchLabels:
      app: flannel
  template:
    metadata:
      labels:
        tier: node
        app: flannel
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: kubernetes.io/os
                operator: In
                values:
               - linux
      hostNetwork: true
      priorityClassName: system-node-critical
      tolerations:
      - operator: Exists
        effect: NoSchedule
      serviceAccountName: flannel
      initContainers:
      - name: install-cni-plugin
       #image: flannelcni/flannel-cni-plugin:v1.1.0 for ppc64le and mips64le (dockerhub limitations may apply)
        image: docker.io/rancher/mirrored-flannelcni-flannel-cni-plugin:v1.1.0
        command:
        - cp
        args:
        - -f
        - /flannel
        - /opt/cni/bin/flannel
        volumeMounts:
        - name: cni-plugin
          mountPath: /opt/cni/bin
      - name: install-cni
       #image: flannelcni/flannel:v0.20.2 for ppc64le and mips64le (dockerhub limitations may apply)
        image: docker.io/rancher/mirrored-flannelcni-flannel:v0.20.2
        command:
        - cp
        args:
        - -f
        - /etc/kube-flannel/cni-conf.json
        - /etc/cni/net.d/10-flannel.conflist
        volumeMounts:
        - name: cni
          mountPath: /etc/cni/net.d
        - name: flannel-cfg
          mountPath: /etc/kube-flannel/
      containers:
      - name: kube-flannel
       #image: flannelcni/flannel:v0.20.2 for ppc64le and mips64le (dockerhub limitations may apply)
        image: docker.io/rancher/mirrored-flannelcni-flannel:v0.20.2
        command:
        - /opt/bin/flanneld
        args:
        - --ip-masq
        - --kube-subnet-mgr
        resources:
          requests:
            cpu: "100m"
            memory: "50Mi"
          limits:
            cpu: "100m"
            memory: "50Mi"
       securityContext:
          privileged: false
          capabilities:
            add: ["NET_ADMIN", "NET_RAW"]
        env:
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        - name: POD_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: EVENT_QUEUE_DEPTH
          value: "5000"
        volumeMounts:
        - name: run
          mountPath: /run/flannel
        - name: flannel-cfg
          mountPath: /etc/kube-flannel/
        - name: xtables-lock
          mountPath: /run/xtables.lock
      volumes:
      - name: run
        hostPath:
          path: /run/flannel
      - name: cni-plugin
        hostPath:
          path: /opt/cni/bin
      - name: cni
        hostPath:
          path: /etc/cni/net.d
      - name: flannel-cfg
        configMap:
          name: kube-flannel-cfg
      - name: xtables-lock
        hostPath:
          path: /run/xtables.lock
          type: FileOrCreate



标签:kube,name,metadata,内容,io,flannel,v0.20,cni
From: https://www.cnblogs.com/smlile-you-me/p/17010899.html

相关文章

  • 华为手机上的备忘录内容如何导出到电脑
    说起国产手机的代表,很多人想到的都是华为手机,而华为手机凭借着流畅的系统、强悍的性能、时尚的外观设计、优秀的摄影摄像获得了广大消费者的青睐,所以现在使用华为手机的用......
  • 软件测试内容的要点
    ​20大的召开后,其中提出着力点坚持把发展经济的着力点放在实体经济上,加快建设制造强国、质量强国、航天强国、交通强国、网络强国、数字中国。​随着网络的快速发展,网络和数......
  • excel内容改变,自动添加批注。
    Dimr1PrivateSubWorksheet_SelectionChange(ByValTargetAsRange)IfTarget.Cells.CountLarge<>1ThenExitSubIfTarget.Formula=""Thenr1="空"Else......
  • 页内嵌多媒体内容的完美实现
    作者 andot如果你不总是用 Windows 上的 Internet Explorer 来上网的话,你可能会注意到,许多网站上的视频点播之类的多媒体内容,你无法直接在 Inter......
  • 实验内容:NTP的客户端实现
           ......
  • 爬虫内容保存到txt文件
    0x01源码如下frompyqueryimportPyQueryimportrequestsurl="https://www.dandanzan10.top/dianying/index.html"heads={'user-agent':'Mozilla/5.0(WindowsN......
  • QT案例词典 -- 存储内容及遍历
    遗憾的是,两个人不能在一起,却偏偏相遇。。。---- 网易云热评一、字典内容就三个词a:第一个字母b:第二个字母C:第三个字母#defineMAX3 二、定义一个词的机构体structdict{......
  • .NET中国开发者峰会11.9 下午分会场1 内容解析
    China.NETConf2019中国.NET开发者峰会即将在上海召开,这次大会是一届完全由社区组织举办的中国.NET开发者盛会,我们筹备大会之初就定下了大会的主题是“开源、共享、创......
  • 第十三周内容回顾
    Q查询的进阶操作实际上就是利用字符串查询,这样就可以跟用户交互fromjango.db.modelimportQq_obj=Q() 先产生一个q对象q_obj.children.append(('pk',1)) 表示给......
  • 7天入门小程序开发 | 02-小程序页面内容填充
            作为第二节课,在今天的课程中我们主要介绍小程序的几块内容:表格WXSS使用页面跳转图片展示        再我们新建了一个模块learning,包含以下两个页面。......