kube-flannel.yaml

2023-05-16

官网对kube-flannel.yml的解释
adds the cni version to the cni-conf.yaml inside the kube-flannel-cfg
(把cui版本加入kube-flannel-cfg的cni-conf.yaml中)

kube-flannel-rbac.yml

# Create the clusterrole and clusterrolebinding:
# $ kubectl create -f kube-flannel-rbac.yml
# Create the pod using the same namespace used by the flannel serviceaccount:
# $ kubectl create --namespace kube-system -f kube-flannel-legacy.yml
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
  name: flannel
rules:
  - apiGroups:
      - ""
    resources:
      - pods
    verbs:
      - get
  - apiGroups:
      - ""
    resources:
      - nodes
    verbs:
      - list
      - watch
  - apiGroups:
      - ""
    resources:
      - nodes/status
    verbs:
      - patch
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
  name: flannel
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: flannel
subjects:
  - kind: ServiceAccount
    name: flannel
    namespace: kube-system

kube-flannel-legacy.yml

---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: flannel
  namespace: kube-system
---
kind: ConfigMap
apiVersion: v1
metadata:
  name: kube-flannel-cfg
  namespace: kube-system
  labels:
    tier: node
    app: flannel
data:
  cni-conf.json: |
    {
      "name": "cbr0",
      "cniVersion": "0.3.1",
      "type": "flannel",
      "delegate": {
        "hairpinMode": true,
        "isDefaultGateway": true
      }
    }
  net-conf.json: |
    {
      "Network": "10.244.0.0/16",
      "Backend": {
        "Type": "vxlan"
      }
    }
---
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
  name: kube-flannel-ds
  namespace: kube-system
  labels:
    tier: node
    app: flannel
spec:
  template:
    metadata:
      labels:
        tier: node
        app: flannel
    spec:
      hostNetwork: true
      nodeSelector:
        beta.kubernetes.io/arch: amd64
      serviceAccountName: flannel
      containers:
      - name: kube-flannel
        image: quay.io/coreos/flannel:v0.10.0-amd64
        command:
        - /opt/bin/flanneld
        args:
        - --ip-masq
        - --kube-subnet-mgr
        resources:
          requests:
            cpu: "100m"
            memory: "50Mi"
          limits:
            cpu: "100m"
            memory: "50Mi"
        securityContext:
          privileged: true
        env:
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        - name: POD_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        volumeMounts:
        - name: run
          mountPath: /run
        - name: flannel-cfg
          mountPath: /etc/kube-flannel/
      - name: install-cni
        image: quay.io/coreos/flannel:v0.10.0-amd64
        command: [ "/bin/sh", "-c", "set -e -x; cp -f /etc/kube-flannel/cni-conf.json /etc/cni/net.d/10-flannel.conf; while true; do sleep 3600; done" ]
        volumeMounts:
        - name: cni
          mountPath: /etc/cni/net.d
        - name: flannel-cfg
          mountPath: /etc/kube-flannel/
      volumes:
        - name: run
          hostPath:
            path: /run
        - name: cni
          hostPath:
            path: /etc/cni/net.d
        - name: flannel-cfg
          configMap:
            name: kube-flannel-cfg

kube-flannel.yml (整合版)

---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
  name: flannel
rules:
  - apiGroups:
      - ""
    resources:
      - pods
    verbs:
      - get
  - apiGroups:
      - ""
    resources:
      - nodes
    verbs:
      - list
      - watch
  - apiGroups:
      - ""
    resources:
      - nodes/status
    verbs:
      - patch
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
  name: flannel
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: flannel
subjects:
- kind: ServiceAccount
  name: flannel
  namespace: kube-system
---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: flannel
  namespace: kube-system
---
kind: ConfigMap
apiVersion: v1
metadata:
  name: kube-flannel-cfg
  namespace: kube-system
  labels:
    tier: node
    app: flannel
data:
  cni-conf.json: |
    {
      "name": "cbr0",
      "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: extensions/v1beta1
kind: DaemonSet
metadata:
  name: kube-flannel-ds-amd64
  namespace: kube-system
  labels:
    tier: node
    app: flannel
spec:
  template:
    metadata:
      labels:
        tier: node
        app: flannel
    spec:
      hostNetwork: true
      nodeSelector:
        beta.kubernetes.io/arch: amd64
      tolerations:
      - operator: Exists
        effect: NoSchedule
      serviceAccountName: flannel
      initContainers:
      - name: install-cni
        image: quay.io/coreos/flannel:v0.10.0-amd64
        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: quay.io/coreos/flannel:v0.10.0-amd64
        command:
        - /opt/bin/flanneld
        args:
        - --ip-masq
        - --kube-subnet-mgr
        resources:
          requests:
            cpu: "100m"
            memory: "50Mi"
          limits:
            cpu: "100m"
            memory: "50Mi"
        securityContext:
          privileged: true
        env:
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        - name: POD_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        volumeMounts:
        - name: run
          mountPath: /run
        - name: flannel-cfg
          mountPath: /etc/kube-flannel/
      volumes:
        - name: run
          hostPath:
            path: /run
        - name: cni
          hostPath:
            path: /etc/cni/net.d
        - name: flannel-cfg
          configMap:
            name: kube-flannel-cfg
---
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
  name: kube-flannel-ds-arm64
  namespace: kube-system
  labels:
    tier: node
    app: flannel
spec:
  template:
    metadata:
      labels:
        tier: node
        app: flannel
    spec:
      hostNetwork: true
      nodeSelector:
        beta.kubernetes.io/arch: arm64
      tolerations:
      - operator: Exists
        effect: NoSchedule
      serviceAccountName: flannel
      initContainers:
      - name: install-cni
        image: quay.io/coreos/flannel:v0.10.0-arm64
        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: quay.io/coreos/flannel:v0.10.0-arm64
        command:
        - /opt/bin/flanneld
        args:
        - --ip-masq
        - --kube-subnet-mgr
        resources:
          requests:
            cpu: "100m"
            memory: "50Mi"
          limits:
            cpu: "100m"
            memory: "50Mi"
        securityContext:
          privileged: true
        env:
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        - name: POD_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        volumeMounts:
        - name: run
          mountPath: /run
        - name: flannel-cfg
          mountPath: /etc/kube-flannel/
      volumes:
        - name: run
          hostPath:
            path: /run
        - name: cni
          hostPath:
            path: /etc/cni/net.d
        - name: flannel-cfg
          configMap:
            name: kube-flannel-cfg
---
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
  name: kube-flannel-ds-arm
  namespace: kube-system
  labels:
    tier: node
    app: flannel
spec:
  template:
    metadata:
      labels:
        tier: node
        app: flannel
    spec:
      hostNetwork: true
      nodeSelector:
        beta.kubernetes.io/arch: arm
      tolerations:
      - operator: Exists
        effect: NoSchedule
      serviceAccountName: flannel
      initContainers:
      - name: install-cni
        image: quay.io/coreos/flannel:v0.10.0-arm
        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: quay.io/coreos/flannel:v0.10.0-arm
        command:
        - /opt/bin/flanneld
        args:
        - --ip-masq
        - --kube-subnet-mgr
        resources:
          requests:
            cpu: "100m"
            memory: "50Mi"
          limits:
            cpu: "100m"
            memory: "50Mi"
        securityContext:
          privileged: true
        env:
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        - name: POD_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        volumeMounts:
        - name: run
          mountPath: /run
        - name: flannel-cfg
          mountPath: /etc/kube-flannel/
      volumes:
        - name: run
          hostPath:
            path: /run
        - name: cni
          hostPath:
            path: /etc/cni/net.d
        - name: flannel-cfg
          configMap:
            name: kube-flannel-cfg
---
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
  name: kube-flannel-ds-ppc64le
  namespace: kube-system
  labels:
    tier: node
    app: flannel
spec:
  template:
    metadata:
      labels:
        tier: node
        app: flannel
    spec:
      hostNetwork: true
      nodeSelector:
        beta.kubernetes.io/arch: ppc64le
      tolerations:
      - operator: Exists
        effect: NoSchedule
      serviceAccountName: flannel
      initContainers:
      - name: install-cni
        image: quay.io/coreos/flannel:v0.10.0-ppc64le
        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: quay.io/coreos/flannel:v0.10.0-ppc64le
        command:
        - /opt/bin/flanneld
        args:
        - --ip-masq
        - --kube-subnet-mgr
        resources:
          requests:
            cpu: "100m"
            memory: "50Mi"
          limits:
            cpu: "100m"
            memory: "50Mi"
        securityContext:
          privileged: true
        env:
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        - name: POD_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        volumeMounts:
        - name: run
          mountPath: /run
        - name: flannel-cfg
          mountPath: /etc/kube-flannel/
      volumes:
        - name: run
          hostPath:
            path: /run
        - name: cni
          hostPath:
            path: /etc/cni/net.d
        - name: flannel-cfg
          configMap:
            name: kube-flannel-cfg
---
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
  name: kube-flannel-ds-s390x
  namespace: kube-system
  labels:
    tier: node
    app: flannel
spec:
  template:
    metadata:
      labels:
        tier: node
        app: flannel
    spec:
      hostNetwork: true
      nodeSelector:
        beta.kubernetes.io/arch: s390x
      tolerations:
      - operator: Exists
        effect: NoSchedule
      serviceAccountName: flannel
      initContainers:
      - name: install-cni
        image: quay.io/coreos/flannel:v0.10.0-s390x
        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: quay.io/coreos/flannel:v0.10.0-s390x
        command:
        - /opt/bin/flanneld
        args:
        - --ip-masq
        - --kube-subnet-mgr
        resources:
          requests:
            cpu: "100m"
            memory: "50Mi"
          limits:
            cpu: "100m"
            memory: "50Mi"
        securityContext:
          privileged: true
        env:
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        - name: POD_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        volumeMounts:
        - name: run
          mountPath: /run
        - name: flannel-cfg
          mountPath: /etc/kube-flannel/
      volumes:
        - name: run
          hostPath:
            path: /run
        - name: cni
          hostPath:
            path: /etc/cni/net.d
        - name: flannel-cfg
          configMap:
            name: kube-flannel-cfg
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

kube-flannel.yaml 的相关文章

随机推荐

  • CSCSWek12 B-Happy 消消乐

    题目描述 Q老师是个很老实的老师 xff0c 最近在积极准备考研 Q老师平时只喜欢用Linux系统 xff0c 所以Q老师的电脑上没什么娱乐的游戏 xff0c 所以Q老师平时除了玩Linux上的赛车游戏SuperTuxKart之外 xff0
  • ubuntu中各个文件夹的作用

    Ubuntu的根目录的文件夹各个含义 home xff1a 家目录 xff0c 所有普通用户都有一个以自己名字命名的文件夹存放在这个目录中 普通用户登录ubuntu默认进入的就是家目录中自己的文件夹 xff0c 可用pwd命令查看 xff0
  • 【CUDA】Ubuntu系统如何安装CUDA保姆级教程(2022年最新)

    本期目录 Linux安装CUDA Linux安装CUDA 输入以下命令 xff0c 查看 GPU 支持的最高 CUDA 版本 笔者这里显示的是 11 6 xff0c 这意味着 xff0c 安装的 CUDA 版本必须 lt 61 11 6 n
  • AVI视频格式分析-封装格式

    AVI视频封装格式分析 使用的工具RIFF块CHUNK块LIST块hdrl LISTavih CHUNKstrl LISTstrh CHUNKstrf CHUNK JUNK CHUNKmovi LISTidx1 CHUNK 使用的工具 el
  • 2014.10.10

    1 主要是制作了suse镜像 xff0c 但是还存在很多问题 xff0c 没有加上默认网关 xff0c 我很不开心 xff0c 根目录没有扩展 2 了解了下 boot from image 通过glance上传一个镜像 xff0c 然后通过
  • 2014.10.11

    我只想骂csdn xff01 截图直接粘过来居然不能直接显示出来 xff01 xff01 xff01 妈蛋 xff01 xff01 1 suse镜像制作完善 xff0c 根目录未扩展这是个大问题 xff0c 默认网关没加上 所谓的根目录扩展
  • 2014.10.12

    早晨8点就起了 xff0c 然后匆匆奔向wx xff0c 为了思念的人 xff0c 吃了个中午饭 xff0c 感觉还不错 xff0c 下午回来之后又去了wpj xff0c 胡扯一通 xff0c 而且发现现在家里人的注意力完全放在我的情感生活
  • vmware 下安装 red hat 9,dos 以及wmware tools

    1 安装vmware vmware 版本 7 11 282343 英文原版下载 xff1a http dl sh ctc 2 pchome net 03 lt VMware workstation full 7 1 1 282343 rar
  • 关于上财陈畅的俄罗斯方块的学习

    最近同学学习C xff0c 想做一个大练习 xff0c 于是选择了俄罗斯方块 xff0c 我 xff0c 计算机专业在校学生 xff0c 说实话理论还行 xff0c 实践动手能力很差 xff0c 同学让我先做 xff0c 然后给他讲讲怎样一
  • xrdp开源项目的代码分析

    最近我的博客将重新恢复更新 xff0c 从2012年3月份起 xff0c 我开始参与某公司的堡垒机项目的研发工作 xff0c 堡垒机又叫内控堡垒机 xff0c 运维审计系统 xff0c 相信不少人也听说过 xff0c 目前电信 xff0c
  • xrdp开源项目的代码分析-1

    首先要说明情况 xff0c 我分析的代码基于xrdp 2012 5 11日 xff0c 而不是最新的代码 xff0c 最新的代码稍有改动 xff0c 但是主体的思想没有变化 xrdp 2012 5 11日代码的下载地址 xff1a http
  • 穿山甲的投放小技巧(账户如何快速过冷启动期)

    1 300 xff08 出价 xff1a 目标成本的2 3倍出价 xff09 xff0c 看成本 2 600 xff08 出价 xff1a 300预算时的一半 xff09 xff0c 看成本 3 放到日满格预算 xff08 出价 xff1a
  • C++加入库dll

    加入头文件加入 include 34 MES inc MES2Interface h 34 pragma comment lib 34 MES lib MES2Interface lib 34 MES2Interface dll 复制到运行
  • 结构体的大小如何计算

    我们实际生活中 xff0c 保存的数据一般不会是同一种类型 xff0c 所以引入了结构体 而结构体的大小也不是成员类型大小的简单相加 需要考虑到系统在存储结构体变量时的地址对齐问题 由于存储变量地址对齐的问题 xff0c 结构体大小计算必须
  • flatpak安装的firefox视频播放卡顿的解决方案

    最近在debian系统中使用flatpak安装最新版的firefox后发现 xff0c firefox在播放视频时十分卡顿 xff0c 经过四处搜索 xff0c 终于找到了解决方案 How to use hardware accelerat
  • NodeBB 安装部署 Linux(阿里云 CentOS 6.3 Redis NodeJS)

    网上有很多 xff0c 写的都不完整 xff0c 我尽量给大家一个完整的 基于Linux 阿里云 CentOS 6 3 安装 NodeBB 论坛 1 先安装NodeJs 安装方式有多种 xff0c 有通过下载源代码编译的 xff0c 有下载
  • shell脚本使用字符串截取报Bad substitution错误的原因即解决方法

    shell脚本使用字符串截取报Bad substitution错误的原因即解决方法 绝大多是是因为解释器的问题 第一步 使用命令查看你指令那个解释器 span class token function ls span bin sh al 我
  • Android播放器(一) 通过FFmpeg解码为RGBA格式播放

    代码可以参考 xff1a Github地址 本文主要介绍如何通过FFmpeg将MP4格式的视频数据解码为一帧一帧的RGBA像素格式数据来播放 因为主要是视频的解码及播放 xff0c 对于音频只是解码出了音频对应的pcm数据 xff0c 并没
  • 终于把(白嫖)阿里ESC服务器搞到手了(方法会写在文章中)

    我这里就讲讲 我购买并搭建服务器的过程和这个过程让我疑惑的点和我最后解决的方案 什么是阿里云 一 阿里云包括什么 xff1f 二 什么是ESC服务器 xff1f 1 1 弹性计算1 1 1 弹性就是 嘿嘿嘿 xff0c 你懂的1 1 2 计
  • kube-flannel.yaml

    官网对kube flannel yml的解释 adds the cni version to the cni conf yaml inside the kube flannel cfg xff08 把cui版本加入kube flannel