一、weave网络插件的默认网段

10.32.0.0/12

二、如何查看weave的启动参数

三、如何安装weave命令

1、下载weave的二进制文件:

(1)首先:
​​​​​​0.80版本:
#wget -O /usr/local/bin/weave https://raw.githubusercontent.com/zettio/weave/master/weave
0.70版本
#yum install -y conntrack-tools
#wget -O /usr/local/bin/weave https://github.com/zettio/weave/releases/download/v0.7.0/weave(2)然后:
#chmod a+x /usr/local/bin/weave

2、通过weave setup预先将weave相关的容器Image下载到各个节点

weave setup

四、weav的相关命令

https://www.cnblogs.com/xiangsikai/p/9900811.html

五、如何安装weave插件

[root@master-binary ~]# vim net.yaml
apiVersion: v1
kind: List
items:- apiVersion: v1kind: ServiceAccountmetadata:name: weave-netannotations:cloud.weave.works/launcher-info: |-{"original-request": {"url": "/k8s//v1.16/net.yaml","date": "Fri Dec 25 2020 11:59:01 GMT+0000 (UTC)"},"email-address": "support@weave.works"}labels:name: weave-netnamespace: kube-system- apiVersion: rbac.authorization.k8s.io/v1kind: ClusterRolemetadata:name: weave-netannotations:cloud.weave.works/launcher-info: |-{"original-request": {"url": "/k8s//v1.16/net.yaml","date": "Fri Dec 25 2020 11:59:01 GMT+0000 (UTC)"},"email-address": "support@weave.works"}labels:name: weave-netrules:- apiGroups:- ''resources:- pods- namespaces- nodesverbs:- get- list- watch- apiGroups:- networking.k8s.ioresources:- networkpoliciesverbs:- get- list- watch- apiGroups:- ''resources:- nodes/statusverbs:- patch- update- apiVersion: rbac.authorization.k8s.io/v1kind: ClusterRoleBindingmetadata:name: weave-netannotations:cloud.weave.works/launcher-info: |-{"original-request": {"url": "/k8s//v1.16/net.yaml","date": "Fri Dec 25 2020 11:59:01 GMT+0000 (UTC)"},"email-address": "support@weave.works"}labels:name: weave-netroleRef:kind: ClusterRolename: weave-netapiGroup: rbac.authorization.k8s.iosubjects:- kind: ServiceAccountname: weave-netnamespace: kube-system- apiVersion: rbac.authorization.k8s.io/v1kind: Rolemetadata:name: weave-netannotations:cloud.weave.works/launcher-info: |-{"original-request": {"url": "/k8s//v1.16/net.yaml","date": "Fri Dec 25 2020 11:59:01 GMT+0000 (UTC)"},"email-address": "support@weave.works"}labels:name: weave-netnamespace: kube-systemrules:- apiGroups:- ''resourceNames:- weave-netresources:- configmapsverbs:- get- update- apiGroups:- ''resources:- configmapsverbs:- create- apiVersion: rbac.authorization.k8s.io/v1kind: RoleBindingmetadata:name: weave-netannotations:cloud.weave.works/launcher-info: |-{"original-request": {"url": "/k8s//v1.16/net.yaml","date": "Fri Dec 25 2020 11:59:01 GMT+0000 (UTC)"},"email-address": "support@weave.works"}labels:name: weave-netnamespace: kube-systemroleRef:kind: Rolename: weave-netapiGroup: rbac.authorization.k8s.iosubjects:- kind: ServiceAccountname: weave-netnamespace: kube-system- apiVersion: apps/v1kind: DaemonSetmetadata:name: weave-netannotations:cloud.weave.works/launcher-info: |-{"original-request": {"url": "/k8s//v1.16/net.yaml","date": "Fri Dec 25 2020 11:59:01 GMT+0000 (UTC)"},"email-address": "support@weave.works"}labels:name: weave-netnamespace: kube-systemspec:minReadySeconds: 5selector:matchLabels:name: weave-nettemplate:metadata:labels:name: weave-netspec:containers:- name: weavecommand:- /home/weave/launch.shenv:- name: HOSTNAMEvalueFrom:fieldRef:apiVersion: v1fieldPath: spec.nodeNameimage: 'docker.io/weaveworks/weave-kube:2.7.0'readinessProbe:httpGet:host: 127.0.0.1path: /statusport: 6784resources:requests:cpu: 50mmemory: 100MisecurityContext:privileged: truevolumeMounts:- name: weavedbmountPath: /weavedb- name: cni-binmountPath: /host/opt- name: cni-bin2mountPath: /host/home- name: cni-confmountPath: /host/etc- name: dbusmountPath: /host/var/lib/dbus- name: lib-modulesmountPath: /lib/modules- name: xtables-lockmountPath: /run/xtables.lock- name: weave-npcenv:- name: HOSTNAMEvalueFrom:fieldRef:apiVersion: v1fieldPath: spec.nodeNameimage: 'docker.io/weaveworks/weave-npc:2.7.0'resources:requests:cpu: 50mmemory: 100MisecurityContext:privileged: truevolumeMounts:- name: xtables-lockmountPath: /run/xtables.lockdnsPolicy: ClusterFirstWithHostNethostNetwork: truepriorityClassName: system-node-criticalrestartPolicy: AlwayssecurityContext:seLinuxOptions: {}serviceAccountName: weave-nettolerations:- effect: NoScheduleoperator: Exists- effect: NoExecuteoperator: Existsvolumes:- name: weavedbhostPath:path: /var/lib/weave- name: cni-binhostPath:path: /opt- name: cni-bin2hostPath:path: /home- name: cni-confhostPath:path: /etc- name: dbushostPath:path: /var/lib/dbus- name: lib-moduleshostPath:path: /lib/modules- name: xtables-lockhostPath:path: /run/xtables.locktype: FileOrCreateupdateStrategy:type: RollingUpdate[root@master-binary ~]# kubectl apply -f net.yaml

六、如何修改weave的默认网段(10.32.0.0/12)

1、在net.yaml文件中,添加如下内容:——参考:https://www.freesion.com/article/51031375901/

                - name: IPALLOC_RANGEvalue: 198.17.0.0/16         #定义Pod的网段

得到最终的net.yaml文件如下:

[root@master-binary ~]# vim net.yaml
apiVersion: v1
kind: List
items:- apiVersion: v1kind: ServiceAccountmetadata:name: weave-netannotations:cloud.weave.works/launcher-info: |-{"original-request": {"url": "/k8s//v1.16/net.yaml","date": "Fri Dec 25 2020 11:59:01 GMT+0000 (UTC)"},"email-address": "support@weave.works"}labels:name: weave-netnamespace: kube-system- apiVersion: rbac.authorization.k8s.io/v1kind: ClusterRolemetadata:name: weave-netannotations:cloud.weave.works/launcher-info: |-{"original-request": {"url": "/k8s//v1.16/net.yaml","date": "Fri Dec 25 2020 11:59:01 GMT+0000 (UTC)"},"email-address": "support@weave.works"}labels:name: weave-netrules:- apiGroups:- ''resources:- pods- namespaces- nodesverbs:- get- list- watch- apiGroups:- networking.k8s.ioresources:- networkpoliciesverbs:- get- list- watch- apiGroups:- ''resources:- nodes/statusverbs:- patch- update- apiVersion: rbac.authorization.k8s.io/v1kind: ClusterRoleBindingmetadata:name: weave-netannotations:cloud.weave.works/launcher-info: |-{"original-request": {"url": "/k8s//v1.16/net.yaml","date": "Fri Dec 25 2020 11:59:01 GMT+0000 (UTC)"},"email-address": "support@weave.works"}labels:name: weave-netroleRef:kind: ClusterRolename: weave-netapiGroup: rbac.authorization.k8s.iosubjects:- kind: ServiceAccountname: weave-netnamespace: kube-system- apiVersion: rbac.authorization.k8s.io/v1kind: Rolemetadata:name: weave-netannotations:cloud.weave.works/launcher-info: |-{"original-request": {"url": "/k8s//v1.16/net.yaml","date": "Fri Dec 25 2020 11:59:01 GMT+0000 (UTC)"},"email-address": "support@weave.works"}labels:name: weave-netnamespace: kube-systemrules:- apiGroups:- ''resourceNames:- weave-netresources:- configmapsverbs:- get- update- apiGroups:- ''resources:- configmapsverbs:- create- apiVersion: rbac.authorization.k8s.io/v1kind: RoleBindingmetadata:name: weave-netannotations:cloud.weave.works/launcher-info: |-{"original-request": {"url": "/k8s//v1.16/net.yaml","date": "Fri Dec 25 2020 11:59:01 GMT+0000 (UTC)"},"email-address": "support@weave.works"}labels:name: weave-netnamespace: kube-systemroleRef:kind: Rolename: weave-netapiGroup: rbac.authorization.k8s.iosubjects:- kind: ServiceAccountname: weave-netnamespace: kube-system- apiVersion: apps/v1kind: DaemonSetmetadata:name: weave-netannotations:cloud.weave.works/launcher-info: |-{"original-request": {"url": "/k8s//v1.16/net.yaml","date": "Fri Dec 25 2020 11:59:01 GMT+0000 (UTC)"},"email-address": "support@weave.works"}labels:name: weave-netnamespace: kube-systemspec:minReadySeconds: 5selector:matchLabels:name: weave-nettemplate:metadata:labels:name: weave-netspec:containers:- name: weavecommand:- /home/weave/launch.shenv:- name: HOSTNAMEvalueFrom:fieldRef:apiVersion: v1fieldPath: spec.nodeName- name: IPALLOC_RANGE                                   #新增的内容value: 198.17.0.0/16                                  #新增的内容image: 'docker.io/weaveworks/weave-kube:2.7.0'readinessProbe:httpGet:host: 127.0.0.1path: /statusport: 6784resources:requests:cpu: 50mmemory: 100MisecurityContext:privileged: truevolumeMounts:- name: weavedbmountPath: /weavedb- name: cni-binmountPath: /host/opt- name: cni-bin2mountPath: /host/home- name: cni-confmountPath: /host/etc- name: dbusmountPath: /host/var/lib/dbus- name: lib-modulesmountPath: /lib/modules- name: xtables-lockmountPath: /run/xtables.lock- name: weave-npcenv:- name: HOSTNAMEvalueFrom:fieldRef:apiVersion: v1fieldPath: spec.nodeNameimage: 'docker.io/weaveworks/weave-npc:2.7.0'resources:requests:cpu: 50mmemory: 100MisecurityContext:privileged: truevolumeMounts:- name: xtables-lockmountPath: /run/xtables.lockdnsPolicy: ClusterFirstWithHostNethostNetwork: truepriorityClassName: system-node-criticalrestartPolicy: AlwayssecurityContext:seLinuxOptions: {}serviceAccountName: weave-nettolerations:- effect: NoScheduleoperator: Exists- effect: NoExecuteoperator: Existsvolumes:- name: weavedbhostPath:path: /var/lib/weave- name: cni-binhostPath:path: /opt- name: cni-bin2hostPath:path: /home- name: cni-confhostPath:path: /etc- name: dbushostPath:path: /var/lib/dbus- name: lib-moduleshostPath:path: /lib/modules- name: xtables-lockhostPath:path: /run/xtables.locktype: FileOrCreateupdateStrategy:type: RollingUpdate

2、删除原来的ds,重新apply——注意:这里不能直接apply,如果直接apply的话,那么"ip  a  | grep weave"查看到的weave网卡上的网段有两个(10.32.0.0/12【weave的默认网段】和198.17.0.1/16【修改后的weave网段】)

3、reboot,重启集群

4、重启成功之后,使用“ip  a  |  grep  weave”,查看修改后的IP网段

44-【kubernetes】kubernetes集群中,如何安装weave命令+如何安装weave插件+如何修改weave的默认网段(10.32.0.0/12)相关推荐

  1. 使用Helm将ASP.NET Core应用程序部署到Kubernetes容器集群

    在<容器化单页面应用中RESTful API的访问>以及<容器化单页面应用中Nginx反向代理与Kubernetes部署>两篇文章中,我介绍了一套容器化ASP.NET Core ...

  2. asp网上书店的代码_使用Helm将ASP.NET Core应用程序部署到Kubernetes容器集群

    在<容器化单页面应用中RESTful API的访问>以及<容器化单页面应用中Nginx反向代理与Kubernetes部署>两篇文章中,我介绍了一套容器化ASP.NET Core ...

  3. K8s——kubernetes集群中ceph集群使用【下】

    kubernetes集群中ceph集群使用 一:CephFS 创建和使用 CephFS 允许用户挂载一个兼容posix的共享目录到多个主机,该存储和NFS共享存储以及CIFS共享目录相似 1.file ...

  4. 在 Kubernetes 集群中使用 MetalLB 作为 LoadBalancer(下)

    作者 | Addo Zhang 来源 | 云原生指北 在上一篇<在 Kubernetes 集群中使用 MetalLB 作为 LoadBalancer(上)>中,我们使用 MetalLB 的 ...

  5. 如何调试Kubernetes集群中的网络延迟问题

    本文深入研究和解决了 Kubernetes 平台上的服务零星延迟问题,就在不久前我也遇到了类似的问题,看似是玄学事件,刚开始归结于网络链路抖动,一段时间后依然存在,虽然影响都是 P99.99 以后的数 ...

  6. 在 Kubernetes 集群中使用 MetalLB 作为 LoadBalancer(下)- BGP

    在上一篇<在 Kubernetes 集群中使用 MetalLB 作为 LoadBalancer(上)>中,我们使用 MetalLB 的 Layer2 模式作为 LoadBalancer 的 ...

  7. Centos7 安装部署Kubernetes(k8s)集群过程

    1.系统环境 服务器版本 docker软件版本 CPU架构 CentOS Linux release 7.9 Docker version 20.10.12 x86_64 2.前言 如下图描述了软件部 ...

  8. Kubernetes集群中部署Node节点

    Kubernetes集群中的Node节点部署 kubernetes的Node节点包含如下组件: flanneld docker kubelet kube-proxy 环境变量 需要的变量. $ # 替 ...

  9. 调试Kubernetes集群中的网络停顿问题

    调试Kubernetes集群中的网络停顿问题 在过去几年,Kubernetes在GitHub已经成为标准的部署模式.目前在GitHub,我们在Kubernetes上运行着海量的面向内部团队以及面向C端 ...

最新文章

  1. 统计学习三要素 模型+策略+算法
  2. 人脸对齐--Dense Face Alignment
  3. 微信小程序实践_4显示新闻(2)
  4. python使用笔记:sys.argv[]的使用
  5. 百练 1363.Rails
  6. [react] 需要把keys设置为全局唯一吗?
  7. 一文讲清,MySQL如何解决多事务并发问题
  8. Shell.FlyoutHeaderTemplate
  9. Vue:Vue项目中引入第三方库报错Unexpected token ‘<‘
  10. 简单算法系列:快速算法/冒泡算法两则
  11. Oracle查看表空间及使用情况
  12. 23个适合logo设计的常用英文字体
  13. 美团点评2018春招后台开发方向编程题 - 题解
  14. linux重装出现cannot load file 5555h,在安装系统出现error cannot load file code 5555h 的解决办法...
  15. 在Exchange Server 2007中限制部分用户只能收发内部邮件 1
  16. 2021年中国环保产业相关政策法规及行业标准分析[图]
  17. SpringSecurity整合JWT
  18. 萝卜家园 Ghost XP 新春装机版 V200801
  19. c3p0 SQLException: An attempt by a client to checkout a Connection has timed out异常
  20. 学习笔记|PSO粒子群算法(1)

热门文章

  1. 青龙面板-酷狗大字版
  2. 前端神器——Charles(花瓶)的下载配置使用流程【MAC版本】
  3. JavaScript解析XML,js解析xml字符串
  4. Jupyter Notebook 新手指南
  5. kingdee 生产用料清单/直接调拨单/生产领料单“仓库”取值逻辑
  6. JS实现日期比较大小(JavaScript)
  7. Keras - DSSM 理论与实践
  8. js 正则 限制 input 只能输入数字,不能输入特殊符号,保留两位小数等效果
  9. 《安富莱嵌入式周报》第270期:2022.06.13--2022.06.19
  10. js 中 alert 的换行的方法