The following topics are discussed:
Installation
Weave Net can be installed onto your CNI-enabled Kubernetes cluster with a single command:
kubectl apply -f https://git.io/weave-kube
After a few seconds, a Weave Net pod should be running on each Node and any further pods you create will be automatically attached to the Weave network.
Note: This command requires Kubernetes 1.4 or later.
CNI, the Container Network Interface, is a proposed standard for configuring network interfaces for Linux containers.
If you do not already have a CNI-enabled cluster, you can bootstrap one easily with kubeadm.
Alternatively, you can configure CNI yourself
Note: If using the Weave CNI Plugin from a prior full install of Weave Net with your cluster, you must first uninstall it before applying the Weave-kube addon. Shut down Kubernetes, and on all nodes perform the following:
weave reset
- Remove any separate provisions you may have made to run Weave at boot-time, e.g.
systemd
units rm /opt/cni/bin/weave-*
Then relaunch Kubernetes and install the addon as described above.
The URL https://git.io/weave-kube points to the YAML file for the latest release of the Weave Net addon. Historic versions are archived on our GitHub release page.
Upgrading the Daemon Sets
Kubernetes does not currently support rolling upgrades of daemon sets, and so you will need to perform the procedure manually:
- Apply the updated addon manifest
kubectl apply -f https://git.io/weave-kube
- Kill each Weave Net pod with
kubectl delete
and then wait for it to reboot before moving on to the next pod.
Note: If you delete all Weave Net pods at the same time they will lose track of IP address range ownership, possibly leading to duplicate IP addresses if you then start a new copy of Weave Net.
Network Policy Controller
The addon also supports the Kubernetes policy API so that you can securely isolate pods from each other based on namespaces and labels. For more information on configuring network policies in Kubernetes see the walkthrough and the NetworkPolicy API object definition.
Note: as of version 1.9 of Weave Net, the Network Policy Controller allows all multicast traffic. Since a single multicast address may be used by multiple pods, we cannot implement rules to isolate them individually. You can turn this behaviour off (block all multicast traffic) by adding --allow-mcast
as an argument to weave-npc
in the YAML configuration.
Troubleshooting Blocked Connections
If you suspect that legitimate traffic is being blocked by the Weave Network Policy Controller, the first thing to do is check the weave-npc
container’s logs.
To do this, first you have to find the name of the Weave Net pod running on the relevant host:
$ kubectl get pods -n kube-system -o wide | grep weave-net
weave-net-08y45 2/2 Running 0 1m 10.128.0.2 host1
weave-net-2zuhy 2/2 Running 0 1m 10.128.0.4 host3
weave-net-oai50 2/2 Running 0 1m 10.128.0.3 host2
Select the relevant container, for example, if you want to look at host2 then pick weave-net-oai50
and run:
$ kubectl logs <weave-pod-name-as-above> -n kube-system weave-npc
When the Weave Network Policy Controller blocks a connection, it logs the following details about it:
- protocol used,
- source IP and port,
- destination IP and port,
as per the below example:
TCP connection from 10.32.0.7:56648 to 10.32.0.11:80 blocked by Weave NPC.
UDP connection from 10.32.0.7:56648 to 10.32.0.11:80 blocked by Weave NPC.
Changing Configuration Options
The default configuration settings can be changed by saving and editing the addon YAML before running kubectl apply
. Additional arguments may be supplied to the Weave router process by adding them to the command:
array in the YAML file.
Some parameters are changed by environment variables; these can be inserted into the YAML file like this:
containers:
- name: weave
env:
- name: IPALLOC_RANGE
value: 10.0.0.0/16
The list of variables you can set is:
- CHECKPOINT_DISABLE – if set to 1, disable checking for new Weave Net versions (default is blank, i.e. check is enabled)
- IPALLOC_RANGE – the range of IP addresses used by Weave Net and the subnet they are placed in (CIDR format; default 10.32.0.0/12)
- EXPECT_NPC – set to 0 to disable Network Policy Controller (default is on)
- KUBE_PEERS – list of addresses of peers in the Kubernetes cluster (default is to fetch the list from the api-server)
- IPALLOC_INIT – set the initialization mode of the IP Address Manager (defaults to consensus amongst the KUBE_PEERS)
- WEAVE_EXPOSE_IP – set the IP address used as a gateway from the Weave network to the host network – this is useful if you are configuring the addon as a static pod.
- WEAVE_MTU – Weave Net defaults to 1376 bytes, but you can set a smaller size if your underlying network has a tighter limit, or set a larger size for better performance if your network supports jumbo frames – see here for more details.
https://www.weave.works/docs/net/latest/kube-addon/
https://yum.dockerproject.org/repo/main/centos/7/Packages/
http://blog.csdn.net/horsefoot/article/details/54018103
相关推荐
From basic updates to integrating Kubernetes with continuous delivery tools such as Jenkins and Gulp, the book demonstrates exactly how Kubernetes will transform the way you work. With further ...
From basic updates to integrating Kubernetes with continuous delivery tools such as Jenkins and Gulp, the book demonstrates exactly how Kubernetes will transform the way you work. With further ...
此外,SISNet还利用循环学习(in-the-loop)机制,使得实例和场景的重建过程可以相互反馈和修正,从而在每次迭代中逐步提高结果的准确性和完整性。这种方法不仅提高了对物体形状细节的恢复能力,还能减少错误分类,...
VTK 13 Integrating with the Windowing__ System.pdf VTK 13 Integrating with the Windowing__ System.pdf
Anaconda addon integrating OpenSCAP to the installation process anaconda anaconda anaconda anaconda anaconda
Integrating_the_Ace_editor_with_Shiny._shinyAce
IHE是Integrating the Healthcare Enterprise的缩写,国内还没有统一定名。IHE并不是一个组织,也没有正式命名为标准,而是一个活动,由其发起单位,如北美放射学会(RSNA)、医疗信息管理系统学会(HIMSS)等组织...
This book also: *explains the GLX model for integrating OpenGL and Xlib *shows how to use OpenGL with Motif and other widget sets *discusses the latest OpenGL standards: OpenGL 1.1, GLX 1.2, and GLU ...
Expand your imagination by letting go of the limitations of traditional animation mediums, software packages, or workflows and integrating 2D and 3D assets. With the updated and expanded second ...
在现实世界中集成语义网(Integrating Semantic Web in the Real World),这个report来自语义网领域的大师Juan F.Sequeda,http://www.juansequeda.com/blog/2019/01/07/my-most-memorable-event-of-2018/,希望更...
Integrating the Orca Optimizer into MySQL 在 MySQL 中集成 Orca 优化器是为了解决 MySQL 查询优化器的限制,特别是在处理复杂查询时。MySQL 查询优化器原本设计用于简单的 OLTP 类型查询,但是在处理更复杂的...
Apress - Integrating Serverless Architecture.2019.epub
Part IV Integrating BIRT Functionality into Applications Chapter 13 Understanding the BIRT APIs Chapter 14 Programming using the BIRT Reporting APIs Chapter 15 Programming using the BIRT Charting API ...
《Integrating Voice and Data Networks》是由Cisco Press出版的一本经典教材,主要面向网络管理人员、开发人员以及希望使用Cisco公司的语音和数据集成产品的CCIE(Cisco Certified Internetwork Expert,思科认证...
the future of fintech - integrating finance and technology in financial services (2017).pdf