使用IPVS实现Kubernetes入口流量负载均衡

新搭建的Kubernetes集群如何承接外部访问的流量,是刚上手Kubernetes时常常会遇到的问题。 在公有云上,官方给出了比较直接的答案,使用LoadBalancer类型的Service,利用公有云提供的负载均衡服务来承接流量, 同时在多台服务器之间进行负载均衡。而在私有环境中,如何正确的将外部流量引入到集群内部,却暂时没有标准的做法。 本文将介绍一种基于IPVS来承接流量并实现负载均衡的方法,供大家参考。

IPVS

IPVS是LVS项目的一部分,是一款运行在Linux kernel当中的4层负载均衡器,性能异常优秀。 根据这篇文章的介绍,使用调优后的内核,可以轻松处理每秒10万次以上的转发请求。目前在中大型互联网项目中, IPVS被广泛的使用,用于承接网站入口处的流量。

Kubernetes Service

Service是Kubernetes的基础概念之一,它将一组Pod抽象成为一项服务,统一的对外提供服务,在各个Pod之间实现负载均衡。 Service有多种类型,最基本的ClusterIP类型解决了集群内部访问服务的需求,NodePort类型通过Node节点的端口暴露服务, 再配合上LoadBalancer类型所定义的负载均衡器,实现了流量经过前端负载均衡器分发到各个Node节点暴露出的端口, 再通过iptables进行一次负载均衡,最终分发到实际的Pod上这个过程。

在Service的Spec中,externalIPs字段平常鲜有人提到,当把IP地址填入这个字段后,kube-proxy会增加对应的iptables规则, 当有以对应IP为目标的流量发送到Node节点时,iptables将进行NAT,将流量转发到对应的服务上。一般情况下, 很少会遇到服务器接受非自身绑定IP流量的情况,所以externalIPs不常被使用,但配合网络层的其他工具,它可以实现给Service绑定外部IP的效果。

今天我们将使用externalIPs配合IPVS的DR(Direct Routing)模式实现将外部流量引入到集群内部,同时实现负载均衡。

环境搭建

为了演示,我们搭建了4台服务器组成的集群。一台服务器运行IPVS,扮演负载均衡器的作用,一台服务器运行Kubernetes Master组件, 其他两台服务器作为Node加入到Kubernetes集群当中。搭建过程这里不详细介绍,大家可以参考相关的文档。

所有服务器在172.17.8.0/24这个网段中。服务的VIP我们设定为172.17.8.201。整体架构入下图所示:

使用IPVS实现Kubernetes入口流量负载均衡_第1张图片

接下来让我们来配置IPVS和Kubernetes。

使用externalIPs暴露Kubernetes Service

首先在集群内部运行2个nginx Pod用作演示。

$ kubectl run nginx --image=nginx --replicas=2

再将它暴露为Service,同时设定externalIPs字段

$ kubectl expose deployment nginx --port 80 --external-ip 172.17.8.201

查看iptables配置,确认对应的iptables规则已经被加入。

$ sudo iptables -t nat -L KUBE-SERVICES -n
Chain KUBE-SERVICES (2 references)
target     prot opt source               destination
KUBE-SVC-4N57TFCL4MD7ZTDA  tcp  --  0.0.0.0/0            10.3.0.156           /* default/nginx: cluster IP */ tcp dpt:80
KUBE-MARK-MASQ  tcp  --  0.0.0.0/0            172.17.8.201         /* default/nginx: external IP */ tcp dpt:80
KUBE-SVC-4N57TFCL4MD7ZTDA  tcp  --  0.0.0.0/0            172.17.8.201         /* default/nginx: external IP */ tcp dpt:80 PHYSDEV match ! --physdev-is-in ADDRTYPE match src-type !LOCAL
KUBE-SVC-4N57TFCL4MD7ZTDA  tcp  --  0.0.0.0/0            172.17.8.201         /* default/nginx: external IP */ tcp dpt:80 ADDRTYPE match dst-type LOCAL
KUBE-SVC-NPX46M4PTMTKRN6Y  tcp  --  0.0.0.0/0            10.3.0.1             /* default/kubernetes:https cluster IP */ tcp dpt:443
KUBE-NODEPORTS  all  --  0.0.0.0/0            0.0.0.0/0            /* kubernetes service nodeports; NOTE: this must be the last rule in this chain */ ADDRTYPE match dst-type LOCAL

配置IPVS实现流量转发

首先在IPVS服务器上,打开ipv4_forward

$ sudo sysctl -w net.ipv4.ip_forward=1

接下来加载IPVS内核模块。

$ sudo modprobe ip_vs

将VIP绑定在网卡上。

$ sudo ifconfig eth0:0 172.17.8.201 netmask 255.255.255.0 broadcast 172.17.8.255

再使用ipvsadm来配置IPVS,这里我们直接使用Docker镜像,避免和特定发行版绑定。

$ docker run --privileged -it --rm --net host luizbafilho/ipvsadm
/ # ipvsadm
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
/ # ipvsadm -A -t 172.17.8.201:80
/ # ipvsadm -a -t 172.17.8.201:80 -r 172.17.8.11:80 -g
/ # ipvsadm -a -t 172.17.8.201:80 -r 172.17.8.12:80 -g
/ # ipvsadm
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  172.17.8.201:http wlc
  -> 172.17.8.11:http             Route   1      0          0
  -> 172.17.8.12:http             Route   1      0          0

可以看到,我们成功建立了从VIP到后端服务器的转发。

验证转发效果

首先使用curl来测试是否能够正常访问nginx服务。

$ curl http://172.17.8.201
DOCTYPE html>


</span><span class="typ" style="color:rgb(166,226,46);">Welcome</span><span class="pln" style="color:rgb(102,217,239);"> to nginx</span><span class="pun" style="color:rgb(248,248,242);">!</</span><span class="pln" style="color:rgb(102,217,239);">title</span><span class="pun" style="color:rgb(248,248,242);">></span><span class="pln" style="color:rgb(102,217,239);">
</span><span class="str" style="color:rgb(230,219,116);"><style></span><span class="pln" style="color:rgb(102,217,239);">
    body </span><span class="pun" style="color:rgb(248,248,242);">{</span><span class="pln" style="color:rgb(102,217,239);">
        width</span><span class="pun" style="color:rgb(248,248,242);">:</span><span class="pln" style="color:rgb(102,217,239);"> </span><span class="lit" style="color:rgb(174,129,255);">35em</span><span class="pun" style="color:rgb(248,248,242);">;</span><span class="pln" style="color:rgb(102,217,239);">
        margin</span><span class="pun" style="color:rgb(248,248,242);">:</span><span class="pln" style="color:rgb(102,217,239);"> </span><span class="lit" style="color:rgb(174,129,255);">0</span><span class="pln" style="color:rgb(102,217,239);"> </span><span class="kwd" style="color:rgb(249,38,89);">auto</span><span class="pun" style="color:rgb(248,248,242);">;</span><span class="pln" style="color:rgb(102,217,239);">
        font</span><span class="pun" style="color:rgb(248,248,242);">-</span><span class="pln" style="color:rgb(102,217,239);">family</span><span class="pun" style="color:rgb(248,248,242);">:</span><span class="pln" style="color:rgb(102,217,239);"> </span><span class="typ" style="color:rgb(166,226,46);">Tahoma</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);"> </span><span class="typ" style="color:rgb(166,226,46);">Verdana</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);"> </span><span class="typ" style="color:rgb(166,226,46);">Arial</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);"> sans</span><span class="pun" style="color:rgb(248,248,242);">-</span><span class="pln" style="color:rgb(102,217,239);">serif</span><span class="pun" style="color:rgb(248,248,242);">;</span><span class="pln" style="color:rgb(102,217,239);">
    </span><span class="pun" style="color:rgb(248,248,242);">}</span><span class="pln" style="color:rgb(102,217,239);">
</span><span class="pun" style="color:rgb(248,248,242);"><</span><span class="str" style="color:rgb(230,219,116);">/style>
</</span><span class="pln" style="color:rgb(102,217,239);">head</span><span class="pun" style="color:rgb(248,248,242);">></span><span class="pln" style="color:rgb(102,217,239);">
</span><span class="str" style="color:rgb(230,219,116);"><body></span><span class="pln" style="color:rgb(102,217,239);">
</span><span class="str" style="color:rgb(230,219,116);"><h1></span><span class="typ" style="color:rgb(166,226,46);">Welcome</span><span class="pln" style="color:rgb(102,217,239);"> to nginx</span><span class="pun" style="color:rgb(248,248,242);">!</</span><span class="pln" style="color:rgb(102,217,239);">h1</span><span class="pun" style="color:rgb(248,248,242);">></span><span class="pln" style="color:rgb(102,217,239);">
</span><span class="str" style="color:rgb(230,219,116);"><p></span><span class="typ" style="color:rgb(166,226,46);">If</span><span class="pln" style="color:rgb(102,217,239);"> you see </span><span class="kwd" style="color:rgb(249,38,89);">this</span><span class="pln" style="color:rgb(102,217,239);"> page</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);"> the nginx web server </span><span class="kwd" style="color:rgb(249,38,89);">is</span><span class="pln" style="color:rgb(102,217,239);"> successfully installed </span><span class="kwd" style="color:rgb(249,38,89);">and</span><span class="pln" style="color:rgb(102,217,239);">
working</span><span class="pun" style="color:rgb(248,248,242);">.</span><span class="pln" style="color:rgb(102,217,239);"> </span><span class="typ" style="color:rgb(166,226,46);">Further</span><span class="pln" style="color:rgb(102,217,239);"> configuration </span><span class="kwd" style="color:rgb(249,38,89);">is</span><span class="pln" style="color:rgb(102,217,239);"> required</span><span class="pun" style="color:rgb(248,248,242);">.</</span><span class="pln" style="color:rgb(102,217,239);">p</span><span class="pun" style="color:rgb(248,248,242);">></span><span class="pln" style="color:rgb(102,217,239);">

</span><span class="str" style="color:rgb(230,219,116);"><p></span><span class="typ" style="color:rgb(166,226,46);">For</span><span class="pln" style="color:rgb(102,217,239);"> online documentation </span><span class="kwd" style="color:rgb(249,38,89);">and</span><span class="pln" style="color:rgb(102,217,239);"> support please refer to
</span><span class="pun" style="color:rgb(248,248,242);"><</span><span class="pln" style="color:rgb(102,217,239);">a href</span><span class="pun" style="color:rgb(248,248,242);">=</span><span class="str" style="color:rgb(230,219,116);">"http://nginx.org/"</span><span class="pun" style="color:rgb(248,248,242);">></span><span class="pln" style="color:rgb(102,217,239);">nginx</span><span class="pun" style="color:rgb(248,248,242);">.</span><span class="pln" style="color:rgb(102,217,239);">org</span><span class="pun" style="color:rgb(248,248,242);"><</span><span class="str" style="color:rgb(230,219,116);">/a>.<br/</span><span class="pun" style="color:rgb(248,248,242);">></span><span class="pln" style="color:rgb(102,217,239);">
</span><span class="typ" style="color:rgb(166,226,46);">Commercial</span><span class="pln" style="color:rgb(102,217,239);"> support </span><span class="kwd" style="color:rgb(249,38,89);">is</span><span class="pln" style="color:rgb(102,217,239);"> available at
</span><span class="pun" style="color:rgb(248,248,242);"><</span><span class="pln" style="color:rgb(102,217,239);">a href</span><span class="pun" style="color:rgb(248,248,242);">=</span><span class="str" style="color:rgb(230,219,116);">"http://nginx.com/"</span><span class="pun" style="color:rgb(248,248,242);">></span><span class="pln" style="color:rgb(102,217,239);">nginx</span><span class="pun" style="color:rgb(248,248,242);">.</span><span class="pln" style="color:rgb(102,217,239);">com</span><span class="pun" style="color:rgb(248,248,242);"><</span><span class="str" style="color:rgb(230,219,116);">/a>.</</span><span class="pln" style="color:rgb(102,217,239);">p</span><span class="pun" style="color:rgb(248,248,242);">></span><span class="pln" style="color:rgb(102,217,239);">

</span><span class="str" style="color:rgb(230,219,116);"><p><em></span><span class="typ" style="color:rgb(166,226,46);">Thank</span><span class="pln" style="color:rgb(102,217,239);"> you </span><span class="kwd" style="color:rgb(249,38,89);">for</span><span class="pln" style="color:rgb(102,217,239);"> </span><span class="kwd" style="color:rgb(249,38,89);">using</span><span class="pln" style="color:rgb(102,217,239);"> nginx</span><span class="pun" style="color:rgb(248,248,242);">.</</span><span class="pln" style="color:rgb(102,217,239);">em</span><span class="pun" style="color:rgb(248,248,242);">></</span><span class="pln" style="color:rgb(102,217,239);">p</span><span class="pun" style="color:rgb(248,248,242);">></span><span class="pln" style="color:rgb(102,217,239);">
</span><span class="pun" style="color:rgb(248,248,242);"><</span><span class="str" style="color:rgb(230,219,116);">/body>
</</span><span class="pln" style="color:rgb(102,217,239);">html</span><span class="pun" style="color:rgb(248,248,242);">></span></pre> 
  </div> 
  <p style="text-indent:30px;"> 接下来在<code style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:13.5px;color:rgb(199,37,78);">172.17.8.11</code>上抓包来确认IPVS的工作情况。</p> 
  <div class="highlight"> 
   <pre class="prettyprint" style="overflow:auto;font-family:'courier new';font-size:12px;line-height:20px;color:rgb(248,248,212);background:rgb(39,40,34);border:none;"><span class="pln" style="color:rgb(102,217,239);">$ sudo tcpdump </span><span class="pun" style="color:rgb(248,248,242);">-</span><span class="pln" style="color:rgb(102,217,239);">i any port </span><span class="lit" style="color:rgb(174,129,255);">80</span><span class="pln" style="color:rgb(102,217,239);">
tcpdump</span><span class="pun" style="color:rgb(248,248,242);">:</span><span class="pln" style="color:rgb(102,217,239);"> verbose output suppressed</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);"> </span><span class="kwd" style="color:rgb(249,38,89);">use</span><span class="pln" style="color:rgb(102,217,239);"> </span><span class="pun" style="color:rgb(248,248,242);">-</span><span class="pln" style="color:rgb(102,217,239);">v </span><span class="kwd" style="color:rgb(249,38,89);">or</span><span class="pln" style="color:rgb(102,217,239);"> </span><span class="pun" style="color:rgb(248,248,242);">-</span><span class="pln" style="color:rgb(102,217,239);">vv </span><span class="kwd" style="color:rgb(249,38,89);">for</span><span class="pln" style="color:rgb(102,217,239);"> full protocol decode
listening on any</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);"> link</span><span class="pun" style="color:rgb(248,248,242);">-</span><span class="pln" style="color:rgb(102,217,239);">type LINUX_SLL </span><span class="pun" style="color:rgb(248,248,242);">(</span><span class="typ" style="color:rgb(166,226,46);">Linux</span><span class="pln" style="color:rgb(102,217,239);"> cooked</span><span class="pun" style="color:rgb(248,248,242);">),</span><span class="pln" style="color:rgb(102,217,239);"> capture size </span><span class="lit" style="color:rgb(174,129,255);">262144</span><span class="pln" style="color:rgb(102,217,239);"> bytes
</span><span class="lit" style="color:rgb(174,129,255);">04</span><span class="pun" style="color:rgb(248,248,242);">:</span><span class="lit" style="color:rgb(174,129,255);">09</span><span class="pun" style="color:rgb(248,248,242);">:</span><span class="lit" style="color:rgb(174,129,255);">07.503858</span><span class="pln" style="color:rgb(102,217,239);"> IP </span><span class="lit" style="color:rgb(174,129,255);">172.17</span><span class="pun" style="color:rgb(248,248,242);">.</span><span class="lit" style="color:rgb(174,129,255);">8.1</span><span class="pun" style="color:rgb(248,248,242);">.</span><span class="lit" style="color:rgb(174,129,255);">51921</span><span class="pln" style="color:rgb(102,217,239);"> </span><span class="pun" style="color:rgb(248,248,242);">></span><span class="pln" style="color:rgb(102,217,239);"> </span><span class="lit" style="color:rgb(174,129,255);">172.17</span><span class="pun" style="color:rgb(248,248,242);">.</span><span class="lit" style="color:rgb(174,129,255);">8.201</span><span class="pun" style="color:rgb(248,248,242);">.</span><span class="pln" style="color:rgb(102,217,239);">http</span><span class="pun" style="color:rgb(248,248,242);">:</span><span class="pln" style="color:rgb(102,217,239);"> </span><span class="typ" style="color:rgb(166,226,46);">Flags</span><span class="pln" style="color:rgb(102,217,239);"> </span><span class="pun" style="color:rgb(248,248,242);">[</span><span class="pln" style="color:rgb(102,217,239);">S</span><span class="pun" style="color:rgb(248,248,242);">],</span><span class="pln" style="color:rgb(102,217,239);"> seq </span><span class="lit" style="color:rgb(174,129,255);">2747628840</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);"> win </span><span class="lit" style="color:rgb(174,129,255);">65535</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);"> options </span><span class="pun" style="color:rgb(248,248,242);">[</span><span class="pln" style="color:rgb(102,217,239);">mss </span><span class="lit" style="color:rgb(174,129,255);">1460</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);">nop</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);">wscale </span><span class="lit" style="color:rgb(174,129,255);">5</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);">nop</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);">nop</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);">TS val </span><span class="lit" style="color:rgb(174,129,255);">1332071005</span><span class="pln" style="color:rgb(102,217,239);"> ecr </span><span class="lit" style="color:rgb(174,129,255);">0</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);">sackOK</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);">eol</span><span class="pun" style="color:rgb(248,248,242);">],</span><span class="pln" style="color:rgb(102,217,239);"> length </span><span class="lit" style="color:rgb(174,129,255);">0</span><span class="pln" style="color:rgb(102,217,239);">
</span><span class="lit" style="color:rgb(174,129,255);">04</span><span class="pun" style="color:rgb(248,248,242);">:</span><span class="lit" style="color:rgb(174,129,255);">09</span><span class="pun" style="color:rgb(248,248,242);">:</span><span class="lit" style="color:rgb(174,129,255);">07.504241</span><span class="pln" style="color:rgb(102,217,239);"> IP </span><span class="lit" style="color:rgb(174,129,255);">10.2</span><span class="pun" style="color:rgb(248,248,242);">.</span><span class="lit" style="color:rgb(174,129,255);">0.1</span><span class="pun" style="color:rgb(248,248,242);">.</span><span class="lit" style="color:rgb(174,129,255);">51921</span><span class="pln" style="color:rgb(102,217,239);"> </span><span class="pun" style="color:rgb(248,248,242);">></span><span class="pln" style="color:rgb(102,217,239);"> </span><span class="lit" style="color:rgb(174,129,255);">10.2</span><span class="pun" style="color:rgb(248,248,242);">.</span><span class="lit" style="color:rgb(174,129,255);">0.3</span><span class="pun" style="color:rgb(248,248,242);">.</span><span class="pln" style="color:rgb(102,217,239);">http</span><span class="pun" style="color:rgb(248,248,242);">:</span><span class="pln" style="color:rgb(102,217,239);"> </span><span class="typ" style="color:rgb(166,226,46);">Flags</span><span class="pln" style="color:rgb(102,217,239);"> </span><span class="pun" style="color:rgb(248,248,242);">[</span><span class="pln" style="color:rgb(102,217,239);">S</span><span class="pun" style="color:rgb(248,248,242);">],</span><span class="pln" style="color:rgb(102,217,239);"> seq </span><span class="lit" style="color:rgb(174,129,255);">2747628840</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);"> win </span><span class="lit" style="color:rgb(174,129,255);">65535</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);"> options </span><span class="pun" style="color:rgb(248,248,242);">[</span><span class="pln" style="color:rgb(102,217,239);">mss </span><span class="lit" style="color:rgb(174,129,255);">1460</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);">nop</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);">wscale </span><span class="lit" style="color:rgb(174,129,255);">5</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);">nop</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);">nop</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);">TS val </span><span class="lit" style="color:rgb(174,129,255);">1332071005</span><span class="pln" style="color:rgb(102,217,239);"> ecr </span><span class="lit" style="color:rgb(174,129,255);">0</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);">sackOK</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);">eol</span><span class="pun" style="color:rgb(248,248,242);">],</span><span class="pln" style="color:rgb(102,217,239);"> length </span><span class="lit" style="color:rgb(174,129,255);">0</span><span class="pln" style="color:rgb(102,217,239);">
</span><span class="lit" style="color:rgb(174,129,255);">04</span><span class="pun" style="color:rgb(248,248,242);">:</span><span class="lit" style="color:rgb(174,129,255);">09</span><span class="pun" style="color:rgb(248,248,242);">:</span><span class="lit" style="color:rgb(174,129,255);">07.504498</span><span class="pln" style="color:rgb(102,217,239);"> IP </span><span class="lit" style="color:rgb(174,129,255);">10.2</span><span class="pun" style="color:rgb(248,248,242);">.</span><span class="lit" style="color:rgb(174,129,255);">0.1</span><span class="pun" style="color:rgb(248,248,242);">.</span><span class="lit" style="color:rgb(174,129,255);">51921</span><span class="pln" style="color:rgb(102,217,239);"> </span><span class="pun" style="color:rgb(248,248,242);">></span><span class="pln" style="color:rgb(102,217,239);"> </span><span class="lit" style="color:rgb(174,129,255);">10.2</span><span class="pun" style="color:rgb(248,248,242);">.</span><span class="lit" style="color:rgb(174,129,255);">0.3</span><span class="pun" style="color:rgb(248,248,242);">.</span><span class="pln" style="color:rgb(102,217,239);">http</span><span class="pun" style="color:rgb(248,248,242);">:</span><span class="pln" style="color:rgb(102,217,239);"> </span><span class="typ" style="color:rgb(166,226,46);">Flags</span><span class="pln" style="color:rgb(102,217,239);"> </span><span class="pun" style="color:rgb(248,248,242);">[</span><span class="pln" style="color:rgb(102,217,239);">S</span><span class="pun" style="color:rgb(248,248,242);">],</span><span class="pln" style="color:rgb(102,217,239);"> seq </span><span class="lit" style="color:rgb(174,129,255);">2747628840</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);"> win </span><span class="lit" style="color:rgb(174,129,255);">65535</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);"> options </span><span class="pun" style="color:rgb(248,248,242);">[</span><span class="pln" style="color:rgb(102,217,239);">mss </span><span class="lit" style="color:rgb(174,129,255);">1460</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);">nop</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);">wscale </span><span class="lit" style="color:rgb(174,129,255);">5</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);">nop</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);">nop</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);">TS val </span><span class="lit" style="color:rgb(174,129,255);">1332071005</span><span class="pln" style="color:rgb(102,217,239);"> ecr </span><span class="lit" style="color:rgb(174,129,255);">0</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);">sackOK</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);">eol</span><span class="pun" style="color:rgb(248,248,242);">],</span><span class="pln" style="color:rgb(102,217,239);"> length </span><span class="lit" style="color:rgb(174,129,255);">0</span><span class="pln" style="color:rgb(102,217,239);">
</span><span class="lit" style="color:rgb(174,129,255);">04</span><span class="pun" style="color:rgb(248,248,242);">:</span><span class="lit" style="color:rgb(174,129,255);">09</span><span class="pun" style="color:rgb(248,248,242);">:</span><span class="lit" style="color:rgb(174,129,255);">07.504827</span><span class="pln" style="color:rgb(102,217,239);"> IP </span><span class="lit" style="color:rgb(174,129,255);">10.2</span><span class="pun" style="color:rgb(248,248,242);">.</span><span class="lit" style="color:rgb(174,129,255);">0.3</span><span class="pun" style="color:rgb(248,248,242);">.</span><span class="pln" style="color:rgb(102,217,239);">http </span><span class="pun" style="color:rgb(248,248,242);">></span><span class="pln" style="color:rgb(102,217,239);"> </span><span class="lit" style="color:rgb(174,129,255);">10.2</span><span class="pun" style="color:rgb(248,248,242);">.</span><span class="lit" style="color:rgb(174,129,255);">0.1</span><span class="pun" style="color:rgb(248,248,242);">.</span><span class="lit" style="color:rgb(174,129,255);">51921</span><span class="pun" style="color:rgb(248,248,242);">:</span><span class="pln" style="color:rgb(102,217,239);"> </span><span class="typ" style="color:rgb(166,226,46);">Flags</span><span class="pln" style="color:rgb(102,217,239);"> </span><span class="pun" style="color:rgb(248,248,242);">[</span><span class="pln" style="color:rgb(102,217,239);">S</span><span class="pun" style="color:rgb(248,248,242);">.],</span><span class="pln" style="color:rgb(102,217,239);"> seq </span><span class="lit" style="color:rgb(174,129,255);">3762638044</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);"> ack </span><span class="lit" style="color:rgb(174,129,255);">2747628841</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);"> win </span><span class="lit" style="color:rgb(174,129,255);">28960</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);"> options </span><span class="pun" style="color:rgb(248,248,242);">[</span><span class="pln" style="color:rgb(102,217,239);">mss </span><span class="lit" style="color:rgb(174,129,255);">1460</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);">sackOK</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);">TS val </span><span class="lit" style="color:rgb(174,129,255);">153786592</span><span class="pln" style="color:rgb(102,217,239);"> ecr </span><span class="lit" style="color:rgb(174,129,255);">1332071005</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);">nop</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);">wscale </span><span class="lit" style="color:rgb(174,129,255);">7</span><span class="pun" style="color:rgb(248,248,242);">],</span><span class="pln" style="color:rgb(102,217,239);"> length </span><span class="lit" style="color:rgb(174,129,255);">0</span><span class="pln" style="color:rgb(102,217,239);">
</span><span class="lit" style="color:rgb(174,129,255);">04</span><span class="pun" style="color:rgb(248,248,242);">:</span><span class="lit" style="color:rgb(174,129,255);">09</span><span class="pun" style="color:rgb(248,248,242);">:</span><span class="lit" style="color:rgb(174,129,255);">07.504827</span><span class="pln" style="color:rgb(102,217,239);"> IP </span><span class="lit" style="color:rgb(174,129,255);">10.2</span><span class="pun" style="color:rgb(248,248,242);">.</span><span class="lit" style="color:rgb(174,129,255);">0.3</span><span class="pun" style="color:rgb(248,248,242);">.</span><span class="pln" style="color:rgb(102,217,239);">http </span><span class="pun" style="color:rgb(248,248,242);">></span><span class="pln" style="color:rgb(102,217,239);"> </span><span class="lit" style="color:rgb(174,129,255);">172.17</span><span class="pun" style="color:rgb(248,248,242);">.</span><span class="lit" style="color:rgb(174,129,255);">8.1</span><span class="pun" style="color:rgb(248,248,242);">.</span><span class="lit" style="color:rgb(174,129,255);">51921</span><span class="pun" style="color:rgb(248,248,242);">:</span><span class="pln" style="color:rgb(102,217,239);"> </span><span class="typ" style="color:rgb(166,226,46);">Flags</span><span class="pln" style="color:rgb(102,217,239);"> </span><span class="pun" style="color:rgb(248,248,242);">[</span><span class="pln" style="color:rgb(102,217,239);">S</span><span class="pun" style="color:rgb(248,248,242);">.],</span><span class="pln" style="color:rgb(102,217,239);"> seq </span><span class="lit" style="color:rgb(174,129,255);">3762638044</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);"> ack </span><span class="lit" style="color:rgb(174,129,255);">2747628841</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);"> win </span><span class="lit" style="color:rgb(174,129,255);">28960</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);"> options </span><span class="pun" style="color:rgb(248,248,242);">[</span><span class="pln" style="color:rgb(102,217,239);">mss </span><span class="lit" style="color:rgb(174,129,255);">1460</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);">sackOK</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);">TS val </span><span class="lit" style="color:rgb(174,129,255);">153786592</span><span class="pln" style="color:rgb(102,217,239);"> ecr </span><span class="lit" style="color:rgb(174,129,255);">1332071005</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);">nop</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);">wscale </span><span class="lit" style="color:rgb(174,129,255);">7</span><span class="pun" style="color:rgb(248,248,242);">],</span><span class="pln" style="color:rgb(102,217,239);"> length </span><span class="lit" style="color:rgb(174,129,255);">0</span><span class="pln" style="color:rgb(102,217,239);">
</span><span class="lit" style="color:rgb(174,129,255);">04</span><span class="pun" style="color:rgb(248,248,242);">:</span><span class="lit" style="color:rgb(174,129,255);">09</span><span class="pun" style="color:rgb(248,248,242);">:</span><span class="lit" style="color:rgb(174,129,255);">07.504888</span><span class="pln" style="color:rgb(102,217,239);"> IP </span><span class="lit" style="color:rgb(174,129,255);">172.17</span><span class="pun" style="color:rgb(248,248,242);">.</span><span class="lit" style="color:rgb(174,129,255);">8.201</span><span class="pun" style="color:rgb(248,248,242);">.</span><span class="pln" style="color:rgb(102,217,239);">http </span><span class="pun" style="color:rgb(248,248,242);">></span><span class="pln" style="color:rgb(102,217,239);"> </span><span class="lit" style="color:rgb(174,129,255);">172.17</span><span class="pun" style="color:rgb(248,248,242);">.</span><span class="lit" style="color:rgb(174,129,255);">8.1</span><span class="pun" style="color:rgb(248,248,242);">.</span><span class="lit" style="color:rgb(174,129,255);">51921</span><span class="pun" style="color:rgb(248,248,242);">:</span><span class="pln" style="color:rgb(102,217,239);"> </span><span class="typ" style="color:rgb(166,226,46);">Flags</span><span class="pln" style="color:rgb(102,217,239);"> </span><span class="pun" style="color:rgb(248,248,242);">[</span><span class="pln" style="color:rgb(102,217,239);">S</span><span class="pun" style="color:rgb(248,248,242);">.],</span><span class="pln" style="color:rgb(102,217,239);"> seq </span><span class="lit" style="color:rgb(174,129,255);">3762638044</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);"> ack </span><span class="lit" style="color:rgb(174,129,255);">2747628841</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);"> win </span><span class="lit" style="color:rgb(174,129,255);">28960</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);"> options </span><span class="pun" style="color:rgb(248,248,242);">[</span><span class="pln" style="color:rgb(102,217,239);">mss </span><span class="lit" style="color:rgb(174,129,255);">1460</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);">sackOK</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);">TS val </span><span class="lit" style="color:rgb(174,129,255);">153786592</span><span class="pln" style="color:rgb(102,217,239);"> ecr </span><span class="lit" style="color:rgb(174,129,255);">1332071005</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);">nop</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);">wscale </span><span class="lit" style="color:rgb(174,129,255);">7</span><span class="pun" style="color:rgb(248,248,242);">],</span><span class="pln" style="color:rgb(102,217,239);"> length </span><span class="lit" style="color:rgb(174,129,255);">0</span><span class="pln" style="color:rgb(102,217,239);">
</span><span class="lit" style="color:rgb(174,129,255);">04</span><span class="pun" style="color:rgb(248,248,242);">:</span><span class="lit" style="color:rgb(174,129,255);">09</span><span class="pun" style="color:rgb(248,248,242);">:</span><span class="lit" style="color:rgb(174,129,255);">07.505599</span><span class="pln" style="color:rgb(102,217,239);"> IP </span><span class="lit" style="color:rgb(174,129,255);">172.17</span><span class="pun" style="color:rgb(248,248,242);">.</span><span class="lit" style="color:rgb(174,129,255);">8.1</span><span class="pun" style="color:rgb(248,248,242);">.</span><span class="lit" style="color:rgb(174,129,255);">51921</span><span class="pln" style="color:rgb(102,217,239);"> </span><span class="pun" style="color:rgb(248,248,242);">></span><span class="pln" style="color:rgb(102,217,239);"> </span><span class="lit" style="color:rgb(174,129,255);">172.17</span><span class="pun" style="color:rgb(248,248,242);">.</span><span class="lit" style="color:rgb(174,129,255);">8.201</span><span class="pun" style="color:rgb(248,248,242);">.</span><span class="pln" style="color:rgb(102,217,239);">http</span><span class="pun" style="color:rgb(248,248,242);">:</span><span class="pln" style="color:rgb(102,217,239);"> </span><span class="typ" style="color:rgb(166,226,46);">Flags</span><span class="pln" style="color:rgb(102,217,239);"> </span><span class="pun" style="color:rgb(248,248,242);">[.],</span><span class="pln" style="color:rgb(102,217,239);"> ack </span><span class="lit" style="color:rgb(174,129,255);">1</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);"> win </span><span class="lit" style="color:rgb(174,129,255);">4117</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);"> options </span><span class="pun" style="color:rgb(248,248,242);">[</span><span class="pln" style="color:rgb(102,217,239);">nop</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);">nop</span><span class="pun" style="color:rgb(248,248,242);">,</span><span class="pln" style="color:rgb(102,217,239);">TS val </span><span class="lit" style="color:rgb(174,129,255);">1332071007</span><span class="pln" style="color:rgb(102,217,239);"> ecr </span><span class="lit" style="color:rgb(174,129,255);">153786592</span><span class="pun" style="color:rgb(248,248,242);">],</span><span class="pln" style="color:rgb(102,217,239);"> length </span><span class="lit" style="color:rgb(174,129,255);">0</span></pre> 
  </div> 
  <p style="text-indent:30px;"> 可以看到,由客户端<code style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:13.5px;color:rgb(199,37,78);">172.17.8.1</code>发送给<code style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:13.5px;color:rgb(199,37,78);">172.17.8.201</code>的封包,经过IPVS的中转发送给了<code style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:13.5px;color:rgb(199,37,78);">172.17.8.11</code>这台服务器, 并经过NAT后发送给了<code style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:13.5px;color:rgb(199,37,78);">10.2.0.3</code>这个Pod。返回的封包不经过IPVS服务器直接从<code style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:13.5px;color:rgb(199,37,78);">172.17.8.11</code>发送给了<code style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:13.5px;color:rgb(199,37,78);">172.17.8.1</code>。 说明IPVS的DR模式工作正常。重复多次测试可以看到流量分别从<code style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:13.5px;color:rgb(199,37,78);">172.17.8.11</code>和<code style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:13.5px;color:rgb(199,37,78);">172.17.8.12</code>进入,再分发给不同的Pod, 说明负载均衡工作正常。</p> 
  <p style="text-indent:30px;"> 与传统的IPVS DR模式配置不同的是,我们并未在承接流量的服务器上执行绑定VIP,再关闭ARP的操作。 那是因为对VIP的处理直接发生在iptables上,我们无需在服务器上运行程序来承接流量,iptables会将流量转发到对应的Pod上。</p> 
  <p style="text-indent:30px;"> 使用这种方法来承接流量,仅需要配置<code style="font-family:Menlo, Monaco, Consolas, 'Courier New', monospace;font-size:13.5px;color:rgb(199,37,78);">externalIPs</code>为VIP即可,无需对服务器做任何特殊的设置,使用起来相当方便。</p> 
  <h2 id="总结" style="font-family:inherit;line-height:1.1;font-size:18px;border-bottom:1px solid rgb(234,234,234);"> 总结</h2> 
  <p style="text-indent:30px;"> 在本文中演示了使用IPVS配合externalIPs实现将外部流量导入到Kubernetes集群中,并实现负载均衡的方法。 希望可以帮助大家理解IPVS和externalIPs的工作原理,以便在恰当的场景下合理使用这两项技术解决问题。 实际部署时,还需要考虑后台服务器可用性检查,IPVS节点主从备份,水平扩展等问题。在这里就不详细介绍了。</p> 
  <p style="text-indent:30px;"> 在Kubernetes中还有许多与externalIPs类似的非常用功能,有些甚至是使用Annotation来进行配置,将来有机会再进一步分享。</p> 
  <p style="text-indent:30px;"> 最后插播下广告,为了实现私有环境下的Kubernetes集群自动化部署和运维,我们为Archon系统增加了PXE管理物理机的支持, 相应的配置案例在这里。如果使用过程中有任何问题,欢迎跟我们联系。</p> 
  <p style="text-indent:30px;"> 原文:使用IPVS实现Kubernetes入口流量负载均衡</p> 
  <div> 
   <br> 
  </div> 
 </div> 
</div>
                            </div>
                        </div>
                    </div>
                    <!--PC和WAP自适应版-->
                    <div id="SOHUCS" sid="1188508656078004224"></div>
                    <script type="text/javascript" src="/views/front/js/chanyan.js"></script>
                    <!-- 文章页-底部 动态广告位 -->
                    <div class="youdao-fixed-ad" id="detail_ad_bottom"></div>
                </div>
                <div class="col-md-3">
                    <div class="row" id="ad">
                        <!-- 文章页-右侧1 动态广告位 -->
                        <div id="right-1" class="col-lg-12 col-md-12 col-sm-4 col-xs-4 ad">
                            <div class="youdao-fixed-ad" id="detail_ad_1"> </div>
                        </div>
                        <!-- 文章页-右侧2 动态广告位 -->
                        <div id="right-2" class="col-lg-12 col-md-12 col-sm-4 col-xs-4 ad">
                            <div class="youdao-fixed-ad" id="detail_ad_2"></div>
                        </div>
                        <!-- 文章页-右侧3 动态广告位 -->
                        <div id="right-3" class="col-lg-12 col-md-12 col-sm-4 col-xs-4 ad">
                            <div class="youdao-fixed-ad" id="detail_ad_3"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="container">
        <h4 class="pt20 mb15 mt0 border-top">你可能感兴趣的:(kubernetes)</h4>
        <div id="paradigm-article-related">
            <div class="recommend-post mb30">
                <ul class="widget-links">
                    <li><a href="/article/1835448111909138432.htm"
                           title="react-intl——react国际化使用方案" target="_blank">react-intl——react国际化使用方案</a>
                        <span class="text-muted">苹果酱0567</span>
<a class="tag" taget="_blank" href="/search/%E9%9D%A2%E8%AF%95%E9%A2%98%E6%B1%87%E6%80%BB%E4%B8%8E%E8%A7%A3%E6%9E%90/1.htm">面试题汇总与解析</a><a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/1.htm">开发语言</a><a class="tag" taget="_blank" href="/search/%E4%B8%AD%E9%97%B4%E4%BB%B6/1.htm">中间件</a><a class="tag" taget="_blank" href="/search/spring/1.htm">spring</a><a class="tag" taget="_blank" href="/search/boot/1.htm">boot</a><a class="tag" taget="_blank" href="/search/%E5%90%8E%E7%AB%AF/1.htm">后端</a>
                        <div>国际化介绍i18n:internationalization国家化简称,首字母+首尾字母间隔的字母个数+尾字母,类似的还有k8s(Kubernetes)React-intl是React中最受欢迎的库。使用步骤安装#usenpmnpminstallreact-intl-D#useyarn项目入口文件配置//index.tsximportReactfrom"react";importReactDOMf</div>
                    </li>
                    <li><a href="/article/1835375621996376064.htm"
                           title="Kubernetes数据持久化" target="_blank">Kubernetes数据持久化</a>
                        <span class="text-muted">看清所苡看轻</span>
<a class="tag" taget="_blank" href="/search/kubernetes%28k8s%29/1.htm">kubernetes(k8s)</a><a class="tag" taget="_blank" href="/search/emptyDir/1.htm">emptyDir</a><a class="tag" taget="_blank" href="/search/HostPath/1.htm">HostPath</a><a class="tag" taget="_blank" href="/search/pv/1.htm">pv</a><a class="tag" taget="_blank" href="/search/pvc/1.htm">pvc</a><a class="tag" taget="_blank" href="/search/kubernetes/1.htm">kubernetes</a>
                        <div>在k8s中,Volume(数据卷)存在明确的生命周期(与包含该数据卷的容器组(pod)相同)。因此Volume的生命周期比同一容器组(pod)中任意容器的生命周期要更长,不管容器重启了多少次,数据都被保留下来。当然,如果pod不存在了,数据卷自然退出了。此时,根据pod所使用的数据卷类型不同,数据可能随着数据卷的退出而删除,也可能被真正持久化,并在下次容器组重启时仍然可以使用。从根本上来说,一个数</div>
                    </li>
                    <li><a href="/article/1835361001260806144.htm"
                           title="Kubernetes部署MySQL数据持久化" target="_blank">Kubernetes部署MySQL数据持久化</a>
                        <span class="text-muted">沫殇-MS</span>
<a class="tag" taget="_blank" href="/search/Kubernetes/1.htm">Kubernetes</a><a class="tag" taget="_blank" href="/search/MySQL%E6%95%B0%E6%8D%AE%E5%BA%93/1.htm">MySQL数据库</a><a class="tag" taget="_blank" href="/search/kubernetes/1.htm">kubernetes</a><a class="tag" taget="_blank" href="/search/mysql/1.htm">mysql</a><a class="tag" taget="_blank" href="/search/%E5%AE%B9%E5%99%A8/1.htm">容器</a>
                        <div>一、安装配置NFS服务端1、安装nfs-kernel-server:sudoapt-yinstallnfs-kernel-server2、服务端创建共享目录#列出所有可用块设备的信息lsblk#格式化磁盘sudomkfs-text4/dev/sdb#创建一个目录:sudomkdir-p/data/nfs/mysql#更改目录权限:sudochown-Rnobody:nogroup/data/nfs</div>
                    </li>
                    <li><a href="/article/1835354574077128704.htm"
                           title="Kubernetes的3种数据持久化方式" target="_blank">Kubernetes的3种数据持久化方式</a>
                        <span class="text-muted">Seal^_^</span>
<a class="tag" taget="_blank" href="/search/%E3%80%90%E4%BA%91%E5%8E%9F%E7%94%9F%E3%80%91%E5%AE%B9%E5%99%A8%E5%8C%96%E4%B8%8E%E7%BC%96%E6%8E%92%E6%8A%80%E6%9C%AF/1.htm">【云原生】容器化与编排技术</a><a class="tag" taget="_blank" href="/search/%E6%8C%81%E7%BB%AD%E9%9B%86%E6%88%90/1.htm">持续集成</a><a class="tag" taget="_blank" href="/search/%23/1.htm">#</a><a class="tag" taget="_blank" href="/search/Kubernetes/1.htm">Kubernetes</a><a class="tag" taget="_blank" href="/search/kubernetes/1.htm">kubernetes</a><a class="tag" taget="_blank" href="/search/%E5%AE%B9%E5%99%A8/1.htm">容器</a><a class="tag" taget="_blank" href="/search/%E4%BA%91%E5%8E%9F%E7%94%9F/1.htm">云原生</a><a class="tag" taget="_blank" href="/search/EmptyDir/1.htm">EmptyDir</a><a class="tag" taget="_blank" href="/search/%E9%9D%A2%E8%AF%95/1.htm">面试</a><a class="tag" taget="_blank" href="/search/HostPath/1.htm">HostPath</a>
                        <div>Kubernetes的3种数据持久化方式1.EmptyDir2.HostPath3.PersistentVolume(PV)TheBegin点点关注,收藏不迷路Kubernetes提供了几种数据持久化方式,以满足不同场景的需求:1.EmptyDir用途:临时数据存储,Pod内容器间共享。特点:生命周期与Pod相同,Pod删除时数据也删除。2.HostPath用途:访问宿主机特定文件或目录。特点:增</div>
                    </li>
                    <li><a href="/article/1835353689854930944.htm"
                           title="【Kubernetes】常见面试题汇总(十一)" target="_blank">【Kubernetes】常见面试题汇总(十一)</a>
                        <span class="text-muted">summer.335</span>
<a class="tag" taget="_blank" href="/search/Kubernetes/1.htm">Kubernetes</a><a class="tag" taget="_blank" href="/search/kubernetes/1.htm">kubernetes</a><a class="tag" taget="_blank" href="/search/%E5%AE%B9%E5%99%A8/1.htm">容器</a><a class="tag" taget="_blank" href="/search/%E4%BA%91%E5%8E%9F%E7%94%9F/1.htm">云原生</a>
                        <div>目录33.简述Kubernetes外部如何访问集群内的服务?34.简述Kubernetesingress?35.简述Kubernetes镜像的下载策略?33.简述Kubernetes外部如何访问集群内的服务?(1)对于Kubernetes,集群外的客户端默认情况,无法通过Pod的IP地址或者Service的虚拟IP地址:虚拟端口号进行访问。(2)通常可以通过以下方式进行访问Kubernetes集群</div>
                    </li>
                    <li><a href="/article/1835351925957160960.htm"
                           title="k8s中Service暴露的种类以及用法" target="_blank">k8s中Service暴露的种类以及用法</a>
                        <span class="text-muted">听说唐僧不吃肉</span>
<a class="tag" taget="_blank" href="/search/K8S/1.htm">K8S</a><a class="tag" taget="_blank" href="/search/kubernetes/1.htm">kubernetes</a><a class="tag" taget="_blank" href="/search/%E5%AE%B9%E5%99%A8/1.htm">容器</a><a class="tag" taget="_blank" href="/search/%E4%BA%91%E5%8E%9F%E7%94%9F/1.htm">云原生</a>
                        <div>一、说明在Kubernetes中,有几种不同的方式可以将服务(Service)暴露给外部流量。这些方式通过定义服务的spec.type字段来确定。二、详解1.ClusterIP定义:默认类型,服务只能在集群内部访问。作用:通过集群内部IP地址暴露服务。示例:spec:type:ClusterIPports:-port:80targetPo</div>
                    </li>
                    <li><a href="/article/1835347257772306432.htm"
                           title="Kubernetes 自定义控制器开发" target="_blank">Kubernetes 自定义控制器开发</a>
                        <span class="text-muted">IT回忆录</span>
<a class="tag" taget="_blank" href="/search/Kubenetes/1.htm">Kubenetes</a><a class="tag" taget="_blank" href="/search/kubernetes/1.htm">kubernetes</a>
                        <div>目录前言一、CRD二、创建数据库表(Mysql)二、控制器开发1.使用kubernetes的examplecontroller模板2.在controller.go中新增数据表监听方法3.修改tools工具生成资源对象结构体定义这里记录开发k8s控制器的一般方式,controller开发主要使用k8s提供的client-go库进行。前言Controller监听集群内部资源对象的变化,编辑资源对象(增</div>
                    </li>
                    <li><a href="/article/1835344356878413824.htm"
                           title="用kubedam搭建的k8s证书过期处理方法" target="_blank">用kubedam搭建的k8s证书过期处理方法</a>
                        <span class="text-muted">我滴鬼鬼呀wks</span>
<a class="tag" taget="_blank" href="/search/k8s/1.htm">k8s</a><a class="tag" taget="_blank" href="/search/1024%E7%A8%8B%E5%BA%8F%E5%91%98%E8%8A%82/1.htm">1024程序员节</a>
                        <div>kubeadm部署的k8s证书过期1、查看证书过期时间kubeadmalphacertscheck-expiration若证书已经过期无法试用kubectl命令建议修改服务器时间到未过期的时间段2、配置kube-controller-manager.yaml文件cat/etc/kubernetes/manifests/kube-controller-manager.yamlapiVersion:v</div>
                    </li>
                    <li><a href="/article/1835340955637608448.htm"
                           title="k8s证书过期问题处理" target="_blank">k8s证书过期问题处理</a>
                        <span class="text-muted">olina_qin</span>
<a class="tag" taget="_blank" href="/search/kubernetes/1.htm">kubernetes</a><a class="tag" taget="_blank" href="/search/%E5%AE%B9%E5%99%A8/1.htm">容器</a><a class="tag" taget="_blank" href="/search/%E4%BA%91%E5%8E%9F%E7%94%9F/1.htm">云原生</a>
                        <div>k8s证书过期问题处理opensslx509-in/etc/kubernetes/pki/apiserver.crt-noout-dateskubeadmcertsrenewallsystemctlrestartkubeleopensslx509-in/etc/kubernetes/pki/apiserver.crt-noout-text|grep"NotAfter"cp/etc/kubernet</div>
                    </li>
                    <li><a href="/article/1835337301350248448.htm"
                           title="Kubernetes Ingress 控制器(Nginx)安装与使用教程" target="_blank">Kubernetes Ingress 控制器(Nginx)安装与使用教程</a>
                        <span class="text-muted">农优影</span>

                        <div>KubernetesIngress控制器(Nginx)安装与使用教程kubernetes-ingressNGINXandNGINXPlusIngressControllersforKubernetes项目地址:https://gitcode.com/gh_mirrors/ku/kubernetes-ingress1.项目目录结构及介绍在nginxinc/kubernetes-ingress仓库中,</div>
                    </li>
                    <li><a href="/article/1835331377520799744.htm"
                           title="【K8s】专题十一:Kubernetes 集群证书过期处理方法" target="_blank">【K8s】专题十一:Kubernetes 集群证书过期处理方法</a>
                        <span class="text-muted">行者Sun1989</span>
<a class="tag" taget="_blank" href="/search/Kubernetes/1.htm">Kubernetes</a><a class="tag" taget="_blank" href="/search/kubernetes/1.htm">kubernetes</a><a class="tag" taget="_blank" href="/search/%E4%BA%91%E5%8E%9F%E7%94%9F/1.htm">云原生</a><a class="tag" taget="_blank" href="/search/%E5%AE%B9%E5%99%A8/1.htm">容器</a>
                        <div>本文内容均来自个人笔记并重新梳理,如有错误欢迎指正!如果对您有帮助,烦请点赞、关注、转发、订阅专栏!专栏订阅入口Linux专栏|Docker专栏|Kubernetes专栏往期精彩文章【Docker】(全网首发)KylinV10下MySQL容器内存占用异常的解决方法【Docker】(全网首发)KylinV10下MySQL容器内存占用异常的解决方法(续)【Docker】MySQL源码构建Docker镜</div>
                    </li>
                    <li><a href="/article/1835269935358636032.htm"
                           title="Docker学习十一:Kubernetes概述" target="_blank">Docker学习十一:Kubernetes概述</a>
                        <span class="text-muted">爱打羽球的程序猿</span>
<a class="tag" taget="_blank" href="/search/Docker%E5%AD%A6%E4%B9%A0%E7%B3%BB%E5%88%97/1.htm">Docker学习系列</a><a class="tag" taget="_blank" href="/search/docker/1.htm">docker</a><a class="tag" taget="_blank" href="/search/kubernetes/1.htm">kubernetes</a><a class="tag" taget="_blank" href="/search/%E5%AD%A6%E4%B9%A0/1.htm">学习</a>
                        <div>一、Kubernetes简介2006年,Google提出了云计算的概念,当时的云计算领域还是以虚拟机为代表的云平台。2013年,Docker横空出世,Docker提出了镜像、仓库等核心概念,规范了服务的交付标准,使得复杂服务的落地变得更加简单,之后Docker又定义了OCI标准,Docker在容器领域称为事实的标准。但是,Docker诞生只是帮助定义了开发和交付标准,如果想要在生产环境中大批量的使</div>
                    </li>
                    <li><a href="/article/1835269304761806848.htm"
                           title="Cloud Native Weekly | 华为云抢先发布Redis5.0,红帽宣布收购混合云提供商" target="_blank">Cloud Native Weekly | 华为云抢先发布Redis5.0,红帽宣布收购混合云提供商</a>
                        <span class="text-muted">weixin_34302561</span>
<a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E5%BA%93/1.htm">数据库</a><a class="tag" taget="_blank" href="/search/devops/1.htm">devops</a><a class="tag" taget="_blank" href="/search/%E5%A4%A7%E6%95%B0%E6%8D%AE/1.htm">大数据</a>
                        <div>1——华为云抢先发布Redis5.02——DigitalOceanK8s服务正式上线3——红帽宣布收购混合云提供商NooBaa4——微软发布多项AzureKubernetes服务更新1华为云抢先发布Redis5.012月17日,华为云在DCS2.0的基础上,快人一步,抢先推出了新的Redis5.0产品,这是一个崭新的突破。目前国内在缓存领域的发展普遍停留在Redis4.0阶段,华为云率先发布了Re</div>
                    </li>
                    <li><a href="/article/1835209173944594432.htm"
                           title="(k8s)Kubernetes 从0到1容器编排之旅" target="_blank">(k8s)Kubernetes 从0到1容器编排之旅</a>
                        <span class="text-muted">道不贱卖,法不轻传</span>
<a class="tag" taget="_blank" href="/search/kubernets/1.htm">kubernets</a><a class="tag" taget="_blank" href="/search/kubernetes/1.htm">kubernetes</a><a class="tag" taget="_blank" href="/search/%E5%AE%B9%E5%99%A8/1.htm">容器</a><a class="tag" taget="_blank" href="/search/%E4%BA%91%E5%8E%9F%E7%94%9F/1.htm">云原生</a>
                        <div>一、引言在当今数字化的浪潮中,Kubernetes如同一艘强大的航船,引领着容器化应用的部署与管理。它以其卓越的灵活性、可扩展性和可靠性,成为众多企业和开发者的首选。然而,要真正发挥Kubernetes的强大威力,仅仅掌握基本操作是远远不够的。本文将带你深入探索Kubernetes使用过程中的奇技妙法,为你开启一段优雅的容器编排之旅。二、高级资源管理之精妙艺术1.资源配额与限制:雕琢资源之美•Ku</div>
                    </li>
                    <li><a href="/article/1835061888858288128.htm"
                           title="【K8S】kubernetes集群架构与组件" target="_blank">【K8S】kubernetes集群架构与组件</a>
                        <span class="text-muted">奇奇怪怪^</span>
<a class="tag" taget="_blank" href="/search/%E4%BA%91/1.htm">云</a><a class="tag" taget="_blank" href="/search/Linux/1.htm">Linux</a><a class="tag" taget="_blank" href="/search/IT/1.htm">IT</a><a class="tag" taget="_blank" href="/search/%E8%BF%90%E7%BB%B4/1.htm">运维</a><a class="tag" taget="_blank" href="/search/%E6%9C%8D%E5%8A%A1%E5%99%A8/1.htm">服务器</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a>
                        <div>文章目录【K8S】kubernetes集群架构与组件kubernetes组件**master组件**node组件整体流程POD终止过程【K8S】kubernetes集群架构与组件kubernetes组件K8S是属于主从设备模型(Master-slave架构),即有Master节点负责集群的调度、管理和运维,Slave节点是集群中的运算工作负载节点在K8S中,主节点一般被称为Master节点,而从节</div>
                    </li>
                    <li><a href="/article/1835058988631289856.htm"
                           title="K8S学习笔记02——K8S组件" target="_blank">K8S学习笔记02——K8S组件</a>
                        <span class="text-muted">沉淅尘</span>
<a class="tag" taget="_blank" href="/search/%23/1.htm">#</a><a class="tag" taget="_blank" href="/search/Docker/1.htm">Docker</a><a class="tag" taget="_blank" href="/search/%23/1.htm">#</a><a class="tag" taget="_blank" href="/search/K8S/1.htm">K8S</a><a class="tag" taget="_blank" href="/search/kubernetes/1.htm">kubernetes</a>
                        <div>Kubernetes组件一、控制平面组件(ControlPlaneComponents)(1)kube-apiserver(2)etcd(3)kube-scheduler(4)kube-controller-manager(5)cloud-controller-manager二、Node组件1.kubelet2.kube-proxy3.容器运行时(ContainerRuntime)三、插件(Add</div>
                    </li>
                    <li><a href="/article/1835054063679533056.htm"
                           title="Kubernetes——组件" target="_blank">Kubernetes——组件</a>
                        <span class="text-muted">窒息う</span>
<a class="tag" taget="_blank" href="/search/Kubernetes/1.htm">Kubernetes</a><a class="tag" taget="_blank" href="/search/kubernetes/1.htm">kubernetes</a><a class="tag" taget="_blank" href="/search/%E5%AE%B9%E5%99%A8/1.htm">容器</a>
                        <div>文章目录K8S的优势核心架构角色与功能集群图例K8S的优势能管理大量跨主机容器快速部署应用快速扩展应用无缝对接新的应用节省资源,优化硬件资源的使用核心架构master(管理节点)node(计算节点)images(镜像节点)角色与功能Master功能提供集群的控制对集群进行全局决策检测和响应集群事件Master节点核心组件APIServer是整个系统的对外接口,提供客户端和其他组件调用后端元数据存储</div>
                    </li>
                    <li><a href="/article/1835046751275413504.htm"
                           title="Kubernetes组件" target="_blank">Kubernetes组件</a>
                        <span class="text-muted">汉只只</span>
<a class="tag" taget="_blank" href="/search/%E7%BD%91%E7%BB%9C/1.htm">网络</a><a class="tag" taget="_blank" href="/search/docker/1.htm">docker</a><a class="tag" taget="_blank" href="/search/%E5%A4%A7%E6%95%B0%E6%8D%AE/1.htm">大数据</a><a class="tag" taget="_blank" href="/search/%E5%88%86%E5%B8%83%E5%BC%8F/1.htm">分布式</a><a class="tag" taget="_blank" href="/search/hadoop/1.htm">hadoop</a>
                        <div>Kubernetes核心组件Kubernetes定义了一组构建块,它们可以共同提供部署、维护和扩展应用程序的机制。组成Kubernetes的组件设计为松耦合和可扩展的,这样可以满足多种不同的工作负载。可扩展性在很大程度上由KubernetesAPI提供——它被作为扩展的内部组件以及Kubernetes上运行的容器等使用。Kubernetes主要由以下几个核心组件组成:etcd保存了整个集群的状态;</div>
                    </li>
                    <li><a href="/article/1835034781197365248.htm"
                           title="【Linux 从基础到进阶】Kubernetes 集群搭建与管理" target="_blank">【Linux 从基础到进阶】Kubernetes 集群搭建与管理</a>
                        <span class="text-muted">爱技术的小伙子</span>
<a class="tag" taget="_blank" href="/search/Linux%E4%BB%8E%E5%9F%BA%E7%A1%80%E5%88%B0%E8%BF%9B%E9%98%B6/1.htm">Linux从基础到进阶</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a><a class="tag" taget="_blank" href="/search/kubernetes/1.htm">kubernetes</a><a class="tag" taget="_blank" href="/search/%E8%BF%90%E7%BB%B4/1.htm">运维</a>
                        <div>Kubernetes集群搭建与管理Kubernetes(简称K8s)是一个用于自动化部署、扩展和管理容器化应用程序的开源平台。它提供了容器编排功能,能够管理大量的容器实例,并支持应用的自动扩展、高可用性和自愈能力。本文将详细介绍如何在CentOS和Ubuntu系统上安装和配置Kubernetes集群,并讲解Kubernetes的基本概念和管理操作。1.Kubernetes基础概念在了解如何搭建Ku</div>
                    </li>
                    <li><a href="/article/1834999728476090368.htm"
                           title="【Kubernetes】常见面试题汇总(十三)" target="_blank">【Kubernetes】常见面试题汇总(十三)</a>
                        <span class="text-muted">summer.335</span>
<a class="tag" taget="_blank" href="/search/Kubernetes/1.htm">Kubernetes</a><a class="tag" taget="_blank" href="/search/kubernetes/1.htm">kubernetes</a><a class="tag" taget="_blank" href="/search/%E5%AE%B9%E5%99%A8/1.htm">容器</a><a class="tag" taget="_blank" href="/search/%E4%BA%91%E5%8E%9F%E7%94%9F/1.htm">云原生</a>
                        <div>目录39.简述KubernetesScheduler使用哪两种算法将Pod绑定到worker节点?40.简述Kuberneteskubelet的作用?41.简述Kuberneteskubelet监控Worker节点资源是使用什么组件来实现的?39.简述KubernetesScheduler使用哪两种算法将Pod绑定到worker节点?KubernetesScheduler根据如下两种调度算法将Po</div>
                    </li>
                    <li><a href="/article/1834893444238110720.htm"
                           title="Ansible自动化部署kubernetes集群" target="_blank">Ansible自动化部署kubernetes集群</a>
                        <span class="text-muted">theo.wu</span>
<a class="tag" taget="_blank" href="/search/kubernetes/1.htm">kubernetes</a><a class="tag" taget="_blank" href="/search/ansible/1.htm">ansible</a><a class="tag" taget="_blank" href="/search/%E8%87%AA%E5%8A%A8%E5%8C%96/1.htm">自动化</a>
                        <div>机器环境介绍1.1.机器信息介绍IPhostnameapplicationCPUMemory192.168.204.129k8s-master01etcd,kube-apiserver,kube-controller-manager,kube-scheduler,kubelet,kube-proxy,containerd2C4G192.168.204.130k8s-worker01etcd,kub</div>
                    </li>
                    <li><a href="/article/1834787055985586176.htm"
                           title="K8S - Emptydir - 取代ELK 使用fluentd 构建logging saidcar" target="_blank">K8S - Emptydir - 取代ELK 使用fluentd 构建logging saidcar</a>
                        <span class="text-muted">nvd11</span>
<a class="tag" taget="_blank" href="/search/K8S/1.htm">K8S</a><a class="tag" taget="_blank" href="/search/kubernetes/1.htm">kubernetes</a>
                        <div>由于k8s的无状态service通常部署在多个POD中,实现多实例面向高并发。但是k8s本身并没有提供集中查询多个pod的日志的功能其中1个常见方案就是ELK.本文的方案是利用fluentdsidecar和emptydir把多个pod的日志导向到bigquery的table中。Emptydir的简介Kubernetes中的EmptyDir是一种用于容器之间共享临时存储的空目录卷类型。EmptyDi</div>
                    </li>
                    <li><a href="/article/1834610443310690304.htm"
                           title="kubernetes里面那些事————控制器" target="_blank">kubernetes里面那些事————控制器</a>
                        <span class="text-muted">背锅攻城师</span>
<a class="tag" taget="_blank" href="/search/kubernetes/1.htm">kubernetes</a><a class="tag" taget="_blank" href="/search/kubernetes/1.htm">kubernetes</a><a class="tag" taget="_blank" href="/search/%E5%AE%B9%E5%99%A8/1.htm">容器</a><a class="tag" taget="_blank" href="/search/%E4%BA%91%E5%8E%9F%E7%94%9F/1.htm">云原生</a>
                        <div>资源-控制器一,控制器作用二,控制器类型2.1,Deployment:无状态应用部署2.2,DaemonSet:确保所有Node运行同一个pod2.3,StatefulSet:有状态应用部署2.4,Job:一次性任务2.5,CronJob:定时任务2.6,pod2.7,service2.8,replicaset2.9,endpoints三,控制器yaml应用3.1,Deployment3.2,Da</div>
                    </li>
                    <li><a href="/article/1834610316504297472.htm"
                           title="kubernetes里面那些事—————存储" target="_blank">kubernetes里面那些事—————存储</a>
                        <span class="text-muted">背锅攻城师</span>
<a class="tag" taget="_blank" href="/search/kubernetes/1.htm">kubernetes</a><a class="tag" taget="_blank" href="/search/%E5%AE%B9%E5%99%A8/1.htm">容器</a><a class="tag" taget="_blank" href="/search/%E4%BA%91%E5%8E%9F%E7%94%9F/1.htm">云原生</a>
                        <div>常用数据卷类型一,emptyDir1.1,emptyDir概念1.2,应用场景1.3,yaml示例二,hostPath2.1,hostPath概念2.2,应用场景2.3,yaml示例三,congfigmap3.1,configmap的作用3.2,注意事项:3.3,使用configmap创建java项目配置文件3.4,subPath应用3.5,configmap作为环境变量四,secret4.1,s</div>
                    </li>
                    <li><a href="/article/1834610316068089856.htm"
                           title="kubernetes-flannel组件的安装方式" target="_blank">kubernetes-flannel组件的安装方式</a>
                        <span class="text-muted">背锅攻城师</span>
<a class="tag" taget="_blank" href="/search/kubernetes/1.htm">kubernetes</a><a class="tag" taget="_blank" href="/search/kubernetes/1.htm">kubernetes</a>
                        <div>使用flannel网络数据转发的过程数据->源容器->宿主机docker0虚拟网卡->flannel0虚拟网卡(UDP封装->etcd->目标容器所在宿主机flannel0->目标容器所在宿主机的docker0虚拟网卡->目标容器文章目录二进制安装flannelyaml文件部署flannel二进制安装flannel一,原有的二进制etcd集群添加配置信息#[Member]ETCD_NAME="et</div>
                    </li>
                    <li><a href="/article/1834546926272475136.htm"
                           title="深入理解Kubernetes:kube-scheduler源码解析" target="_blank">深入理解Kubernetes:kube-scheduler源码解析</a>
                        <span class="text-muted">mujingluo</span>
<a class="tag" taget="_blank" href="/search/kubernetes/1.htm">kubernetes</a><a class="tag" taget="_blank" href="/search/%E5%AE%B9%E5%99%A8/1.htm">容器</a><a class="tag" taget="_blank" href="/search/%E4%BA%91%E5%8E%9F%E7%94%9F/1.htm">云原生</a>
                        <div>Kubernetes的调度器(kube-scheduler)是整个系统中至关重要的组件,它负责将待调度的Pods分配到合适的节点上。本文将深入分析kube-scheduler的源码,揭示其内部工作机制。kube-scheduler的核心功能kube-scheduler的核心功能包括:监听Pod变化:通过KubernetesAPI监听所有未调度的Pods。过滤(Filtering):根据一系列规则(</div>
                    </li>
                    <li><a href="/article/1834543901835358208.htm"
                           title="开源项目 Kubernetes 源码探索与部署指南" target="_blank">开源项目 Kubernetes 源码探索与部署指南</a>
                        <span class="text-muted">邹滢朦</span>

                        <div>开源项目Kubernetes源码探索与部署指南kubernetesThisistherepothattracksallpatchestotheOpenShiftdistributionofKubernetesonbranchescorrespondingtoOpenShiftreleases.Seehttps://github.com/openshift/kubernetes/blob/maste</div>
                    </li>
                    <li><a href="/article/1834522729504665600.htm"
                           title="【2023年】云计算金砖牛刀小试4" target="_blank">【2023年】云计算金砖牛刀小试4</a>
                        <span class="text-muted">geekgold</span>
<a class="tag" taget="_blank" href="/search/%E4%BA%91%E8%AE%A1%E7%AE%97/1.htm">云计算</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a><a class="tag" taget="_blank" href="/search/%E5%AE%B9%E5%99%A8/1.htm">容器</a><a class="tag" taget="_blank" href="/search/jenkins/1.htm">jenkins</a><a class="tag" taget="_blank" href="/search/kubernetes/1.htm">kubernetes</a>
                        <div>容器云问题1.Kubernetes集群支持Pod优先级抢占,通过抢占式调度策略来实现同一个Node节点内部的Pod对象抢占。在master节点/root目录下编写YAML文件schedule.yaml创建一个抢占式调度策略,具体要求如下:(1)抢占式调度策略名称:high-scheduling;(2)优先级为1000000;(3)不要将该调度策略设置为默认优先调度策略。vischedule.yam</div>
                    </li>
                    <li><a href="/article/1834471045063602176.htm"
                           title="【Kubernetes】(K8S)彻底卸载详细教程" target="_blank">【Kubernetes】(K8S)彻底卸载详细教程</a>
                        <span class="text-muted">哒哒-blog</span>
<a class="tag" taget="_blank" href="/search/Kubernetes/1.htm">Kubernetes</a><a class="tag" taget="_blank" href="/search/kubernetes/1.htm">kubernetes</a><a class="tag" taget="_blank" href="/search/%E5%AE%B9%E5%99%A8/1.htm">容器</a><a class="tag" taget="_blank" href="/search/%E4%BA%91%E5%8E%9F%E7%94%9F/1.htm">云原生</a>
                        <div>以下全部操作都是使用root用户进行(非root用户可以使用sudo),并且全部命令都需要在Kubernetes集群的所有节点分别执行:第一步、停止K8S所有节点执行:123systemctlstopkubeletsystemctlstopetcdsystemctlstopdocker第二步、清空K8S集群设置所有节点执行:1kubeadmreset-f第三步、删除K8S相关软件所有节点执行:12</div>
                    </li>
                    <li><a href="/article/1834467134424576000.htm"
                           title="二进制方式部署K8s高可用集群" target="_blank">二进制方式部署K8s高可用集群</a>
                        <span class="text-muted">麻辣头马头</span>
<a class="tag" taget="_blank" href="/search/kubernetes/1.htm">kubernetes</a><a class="tag" taget="_blank" href="/search/%E5%AE%B9%E5%99%A8/1.htm">容器</a><a class="tag" taget="_blank" href="/search/%E4%BA%91%E5%8E%9F%E7%94%9F/1.htm">云原生</a><a class="tag" taget="_blank" href="/search/%E8%BF%90%E7%BB%B4/1.htm">运维</a><a class="tag" taget="_blank" href="/search/%E6%9C%8D%E5%8A%A1%E5%99%A8/1.htm">服务器</a><a class="tag" taget="_blank" href="/search/docker/1.htm">docker</a><a class="tag" taget="_blank" href="/search/%E7%BD%91%E7%BB%9C/1.htm">网络</a>
                        <div>1二进制方式部署K8s高可用集群1.1kubeadm和二进制安装k8s适用场景分析kubeadm是官方提供的开源工具,是一个开源项目,用于快速搭建kubernetes集群,目前是比较方便和推荐使用的。kubeadminit以及kubeadmjoin这两个命令可以快速创建kubernetes集群。Kubeadm初始化k8s,所有的组件都是以pod形式运行的,具备故障自恢复能力。kubeadm是工具,</div>
                    </li>
                                <li><a href="/article/66.htm"
                                       title="项目中 枚举与注解的结合使用" target="_blank">项目中 枚举与注解的结合使用</a>
                                    <span class="text-muted">飞翔的马甲</span>
<a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/enum/1.htm">enum</a><a class="tag" taget="_blank" href="/search/annotation/1.htm">annotation</a>
                                    <div>前言:版本兼容,一直是迭代开发头疼的事,最近新版本加上了支持新题型,如果新创建一份问卷包含了新题型,那旧版本客户端就不支持,如果新创建的问卷不包含新题型,那么新旧客户端都支持。这里面我们通过给问卷类型枚举增加自定义注解的方式完成。顺便巩固下枚举与注解。 
 
一、枚举 
1.在创建枚举类的时候,该类已继承java.lang.Enum类,所以自定义枚举类无法继承别的类,但可以实现接口。 
 
   </div>
                                </li>
                                <li><a href="/article/193.htm"
                                       title="【Scala十七】Scala核心十一:下划线_的用法" target="_blank">【Scala十七】Scala核心十一:下划线_的用法</a>
                                    <span class="text-muted">bit1129</span>
<a class="tag" taget="_blank" href="/search/scala/1.htm">scala</a>
                                    <div>下划线_在Scala中广泛应用,_的基本含义是作为占位符使用。_在使用时是出问题非常多的地方,本文将不断完善_的使用场景以及所表达的含义 
  1. 在高阶函数中使用 
scala> val list = List(-3,8,7,9)
list: List[Int] = List(-3, 8, 7, 9)

scala> list.filter(_ > 7)
r</div>
                                </li>
                                <li><a href="/article/320.htm"
                                       title="web缓存基础:术语、http报头和缓存策略" target="_blank">web缓存基础:术语、http报头和缓存策略</a>
                                    <span class="text-muted">dalan_123</span>
<a class="tag" taget="_blank" href="/search/Web/1.htm">Web</a>
                                    <div>对于很多人来说,去访问某一个站点,若是该站点能够提供智能化的内容缓存来提高用户体验,那么最终该站点的访问者将络绎不绝。缓存或者对之前的请求临时存储,是http协议实现中最核心的内容分发策略之一。分发路径中的组件均可以缓存内容来加速后续的请求,这是受控于对该内容所声明的缓存策略。接下来将讨web内容缓存策略的基本概念,具体包括如如何选择缓存策略以保证互联网范围内的缓存能够正确处理的您的内容,并谈论下</div>
                                </li>
                                <li><a href="/article/447.htm"
                                       title="crontab 问题" target="_blank">crontab 问题</a>
                                    <span class="text-muted">周凡杨</span>
<a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a><a class="tag" taget="_blank" href="/search/crontab/1.htm">crontab</a><a class="tag" taget="_blank" href="/search/unix/1.htm">unix</a>
                                    <div>  
一:  0481-079   Reached   a   symbol   that   is   not   expected.   
   
背景:  
*/5   *   *   *   *  /usr/IBMIHS/rsync.sh  </div>
                                </li>
                                <li><a href="/article/574.htm"
                                       title="让tomcat支持2级域名共享session" target="_blank">让tomcat支持2级域名共享session</a>
                                    <span class="text-muted">g21121</span>
<a class="tag" taget="_blank" href="/search/session/1.htm">session</a>
                                    <div>tomcat默认情况下是不支持2级域名共享session的,所有有些情况下登陆后从主域名跳转到子域名会发生链接session不相同的情况,但是只需修改几处配置就可以了。 
打开tomcat下conf下context.xml文件 
找到Context标签,修改为如下内容 
如果你的域名是www.test.com 
<Context sessionCookiePath="/path&q</div>
                                </li>
                                <li><a href="/article/701.htm"
                                       title="web报表工具FineReport常用函数的用法总结(数学和三角函数)" target="_blank">web报表工具FineReport常用函数的用法总结(数学和三角函数)</a>
                                    <span class="text-muted">老A不折腾</span>
<a class="tag" taget="_blank" href="/search/Web/1.htm">Web</a><a class="tag" taget="_blank" href="/search/finereport/1.htm">finereport</a><a class="tag" taget="_blank" href="/search/%E6%80%BB%E7%BB%93/1.htm">总结</a>
                                    <div>  
ABS 
ABS(number):返回指定数字的绝对值。绝对值是指没有正负符号的数值。 
Number:需要求出绝对值的任意实数。 
示例: 
ABS(-1.5)等于1.5。 
ABS(0)等于0。 
ABS(2.5)等于2.5。 
  
ACOS 
ACOS(number):返回指定数值的反余弦值。反余弦值为一个角度,返回角度以弧度形式表示。 
Number:需要返回角</div>
                                </li>
                                <li><a href="/article/828.htm"
                                       title="linux 启动java进程 sh文件" target="_blank">linux 启动java进程 sh文件</a>
                                    <span class="text-muted">墙头上一根草</span>
<a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a><a class="tag" taget="_blank" href="/search/shell/1.htm">shell</a><a class="tag" taget="_blank" href="/search/jar/1.htm">jar</a>
                                    <div>#!/bin/bash
#初始化服务器的进程PId变量
user_pid=0;
robot_pid=0;
loadlort_pid=0;
gateway_pid=0;

#########
#检查相关服务器是否启动成功
#说明:
#使用JDK自带的JPS命令及grep命令组合,准确查找pid
#jps 加 l 参数,表示显示java的完整包路径
#使用awk,分割出pid </div>
                                </li>
                                <li><a href="/article/955.htm"
                                       title="我的spring学习笔记5-如何使用ApplicationContext替换BeanFactory" target="_blank">我的spring学习笔记5-如何使用ApplicationContext替换BeanFactory</a>
                                    <span class="text-muted">aijuans</span>
<a class="tag" taget="_blank" href="/search/Spring+3+%E7%B3%BB%E5%88%97/1.htm">Spring 3 系列</a>
                                    <div>如何使用ApplicationContext替换BeanFactory? 
 
package onlyfun.caterpillar.device;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import</div>
                                </li>
                                <li><a href="/article/1082.htm"
                                       title="Linux 内存使用方法详细解析" target="_blank">Linux 内存使用方法详细解析</a>
                                    <span class="text-muted">annan211</span>
<a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a><a class="tag" taget="_blank" href="/search/%E5%86%85%E5%AD%98/1.htm">内存</a><a class="tag" taget="_blank" href="/search/Linux%E5%86%85%E5%AD%98%E8%A7%A3%E6%9E%90/1.htm">Linux内存解析</a>
                                    <div>来源 http://blog.jobbole.com/45748/ 
 
 

我是一名程序员,那么我在这里以一个程序员的角度来讲解Linux内存的使用。

一提到内存管理,我们头脑中闪出的两个概念,就是虚拟内存,与物理内存。这两个概念主要来自于linux内核的支持。

Linux在内存管理上份为两级,一级是线性区,类似于00c73000-00c88000,对应于虚拟内存,它实际上不占用</div>
                                </li>
                                <li><a href="/article/1209.htm"
                                       title="数据库的单表查询常用命令及使用方法(-)" target="_blank">数据库的单表查询常用命令及使用方法(-)</a>
                                    <span class="text-muted">百合不是茶</span>
<a class="tag" taget="_blank" href="/search/oracle/1.htm">oracle</a><a class="tag" taget="_blank" href="/search/%E5%87%BD%E6%95%B0/1.htm">函数</a><a class="tag" taget="_blank" href="/search/%E5%8D%95%E8%A1%A8%E6%9F%A5%E8%AF%A2/1.htm">单表查询</a>
                                    <div>  
  
创建数据库; 
      
--建表
create table bloguser(username varchar2(20),userage number(10),usersex char(2));

 
      创建bloguser表,里面有三个字段 
  
  
&nbs</div>
                                </li>
                                <li><a href="/article/1336.htm"
                                       title="多线程基础知识" target="_blank">多线程基础知识</a>
                                    <span class="text-muted">bijian1013</span>
<a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/%E5%A4%9A%E7%BA%BF%E7%A8%8B/1.htm">多线程</a><a class="tag" taget="_blank" href="/search/thread/1.htm">thread</a><a class="tag" taget="_blank" href="/search/java%E5%A4%9A%E7%BA%BF%E7%A8%8B/1.htm">java多线程</a>
                                    <div>一.进程和线程 
进程就是一个在内存中独立运行的程序,有自己的地址空间。如正在运行的写字板程序就是一个进程。 
“多任务”:指操作系统能同时运行多个进程(程序)。如WINDOWS系统可以同时运行写字板程序、画图程序、WORD、Eclipse等。 
线程:是进程内部单一的一个顺序控制流。 
线程和进程 
a.       每个进程都有独立的</div>
                                </li>
                                <li><a href="/article/1463.htm"
                                       title="fastjson简单使用实例" target="_blank">fastjson简单使用实例</a>
                                    <span class="text-muted">bijian1013</span>
<a class="tag" taget="_blank" href="/search/fastjson/1.htm">fastjson</a>
                                    <div>一.简介 
        阿里巴巴fastjson是一个Java语言编写的高性能功能完善的JSON库。它采用一种“假定有序快速匹配”的算法,把JSON Parse的性能提升到极致,是目前Java语言中最快的JSON库;包括“序列化”和“反序列化”两部分,它具备如下特征:     </div>
                                </li>
                                <li><a href="/article/1590.htm"
                                       title="【RPC框架Burlap】Spring集成Burlap" target="_blank">【RPC框架Burlap】Spring集成Burlap</a>
                                    <span class="text-muted">bit1129</span>
<a class="tag" taget="_blank" href="/search/spring/1.htm">spring</a>
                                    <div>Burlap和Hessian同属于codehaus的RPC调用框架,但是Burlap已经几年不更新,所以Spring在4.0里已经将Burlap的支持置为Deprecated,所以在选择RPC框架时,不应该考虑Burlap了。 
这篇文章还是记录下Burlap的用法吧,主要是复制粘贴了Hessian与Spring集成一文,【RPC框架Hessian四】Hessian与Spring集成 
 </div>
                                </li>
                                <li><a href="/article/1717.htm"
                                       title="【Mahout一】基于Mahout 命令参数含义" target="_blank">【Mahout一】基于Mahout 命令参数含义</a>
                                    <span class="text-muted">bit1129</span>
<a class="tag" taget="_blank" href="/search/Mahout/1.htm">Mahout</a>
                                    <div>1. mahout seqdirectory 
  
    $ mahout seqdirectory 
        --input (-i) input               Path to job input directory(原始文本文件).
        --output (-o) output             The directory pathna</div>
                                </li>
                                <li><a href="/article/1844.htm"
                                       title="linux使用flock文件锁解决脚本重复执行问题" target="_blank">linux使用flock文件锁解决脚本重复执行问题</a>
                                    <span class="text-muted">ronin47</span>
<a class="tag" taget="_blank" href="/search/linux+lock%E3%80%80%E9%87%8D%E5%A4%8D%E6%89%A7%E8%A1%8C/1.htm">linux lock 重复执行</a>
                                    <div>linux的crontab命令,可以定时执行操作,最小周期是每分钟执行一次。关于crontab实现每秒执行可参考我之前的文章《linux crontab 实现每秒执行》现在有个问题,如果设定了任务每分钟执行一次,但有可能一分钟内任务并没有执行完成,这时系统会再执行任务。导致两个相同的任务在执行。 
例如:       
<?         
// 
test
.php      </div>
                                </li>
                                <li><a href="/article/1971.htm"
                                       title="java-74-数组中有一个数字出现的次数超过了数组长度的一半,找出这个数字" target="_blank">java-74-数组中有一个数字出现的次数超过了数组长度的一半,找出这个数字</a>
                                    <span class="text-muted">bylijinnan</span>
<a class="tag" taget="_blank" href="/search/java/1.htm">java</a>
                                    <div>

public class OcuppyMoreThanHalf {

	/**
	 * Q74 数组中有一个数字出现的次数超过了数组长度的一半,找出这个数字
	 * two solutions:
	 * 1.O(n)
	 * see <beauty of coding>--每次删除两个不同的数字,不改变数组的特性
	 * 2.O(nlogn)
	 * 排序。中间</div>
                                </li>
                                <li><a href="/article/2098.htm"
                                       title="linux 系统相关命令" target="_blank">linux 系统相关命令</a>
                                    <span class="text-muted">candiio</span>
<a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a>
                                    <div>系统参数 
cat /proc/cpuinfo  cpu相关参数 
cat /proc/meminfo 内存相关参数 
cat /proc/loadavg 负载情况 
性能参数 
1)top 
M:按内存使用排序 
P:按CPU占用排序 
1:显示各CPU的使用情况 
k:kill进程 
o:更多排序规则 
回车:刷新数据 
2)ulimit 
ulimit -a:显示本用户的系统限制参</div>
                                </li>
                                <li><a href="/article/2225.htm"
                                       title="[经营与资产]保持独立性和稳定性对于软件开发的重要意义" target="_blank">[经营与资产]保持独立性和稳定性对于软件开发的重要意义</a>
                                    <span class="text-muted">comsci</span>
<a class="tag" taget="_blank" href="/search/%E8%BD%AF%E4%BB%B6%E5%BC%80%E5%8F%91/1.htm">软件开发</a>
                                    <div> 
 
     一个软件的架构从诞生到成熟,中间要经过很多次的修正和改造 
 
      如果在这个过程中,外界的其它行业的资本不断的介入这种软件架构的升级过程中 
    
      那么软件开发者原有的设计思想和开发路线</div>
                                </li>
                                <li><a href="/article/2352.htm"
                                       title="在CentOS5.5上编译OpenJDK6" target="_blank">在CentOS5.5上编译OpenJDK6</a>
                                    <span class="text-muted">Cwind</span>
<a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a><a class="tag" taget="_blank" href="/search/OpenJDK/1.htm">OpenJDK</a>
                                    <div>几番周折终于在自己的CentOS5.5上编译成功了OpenJDK6,将编译过程和遇到的问题作一简要记录,备查。  
0. OpenJDK介绍 
OpenJDK是Sun(现Oracle)公司发布的基于GPL许可的Java平台的实现。其优点: 
1、它的核心代码与同时期Sun(-> Oracle)的产品版基本上是一样的,血统纯正,不用担心性能问题,也基本上没什么兼容性问题;(代码上最主要的差异是</div>
                                </li>
                                <li><a href="/article/2479.htm"
                                       title="java乱码问题" target="_blank">java乱码问题</a>
                                    <span class="text-muted">dashuaifu</span>
<a class="tag" taget="_blank" href="/search/java%E4%B9%B1%E7%A0%81%E9%97%AE%E9%A2%98/1.htm">java乱码问题</a><a class="tag" taget="_blank" href="/search/js%E4%B8%AD%E6%96%87%E4%B9%B1%E7%A0%81/1.htm">js中文乱码</a>
                                    <div>swfupload上传文件参数值为中文传递到后台接收中文乱码               在js中用setPostParams({"tag" : encodeURI( document.getElementByIdx_x("filetag").value,"utf-8")}); 
然后在servlet中String t</div>
                                </li>
                                <li><a href="/article/2606.htm"
                                       title="cygwin很多命令显示command not found的解决办法" target="_blank">cygwin很多命令显示command not found的解决办法</a>
                                    <span class="text-muted">dcj3sjt126com</span>
<a class="tag" taget="_blank" href="/search/cygwin/1.htm">cygwin</a>
                                    <div>cygwin很多命令显示command not found的解决办法 
  
修改cygwin.BAT文件如下 
@echo off 
D: 
set CYGWIN=tty notitle glob 
set PATH=%PATH%;d:\cygwin\bin;d:\cygwin\sbin;d:\cygwin\usr\bin;d:\cygwin\usr\sbin;d:\cygwin\us</div>
                                </li>
                                <li><a href="/article/2733.htm"
                                       title="[介绍]从 Yii 1.1 升级" target="_blank">[介绍]从 Yii 1.1 升级</a>
                                    <span class="text-muted">dcj3sjt126com</span>
<a class="tag" taget="_blank" href="/search/PHP/1.htm">PHP</a><a class="tag" taget="_blank" href="/search/yii2/1.htm">yii2</a>
                                    <div>2.0 版框架是完全重写的,在 1.1 和 2.0 两个版本之间存在相当多差异。因此从 1.1 版升级并不像小版本间的跨越那么简单,通过本指南你将会了解两个版本间主要的不同之处。 
如果你之前没有用过 Yii 1.1,可以跳过本章,直接从"入门篇"开始读起。 
请注意,Yii 2.0 引入了很多本章并没有涉及到的新功能。强烈建议你通读整部权威指南来了解所有新特性。这样有可能会发</div>
                                </li>
                                <li><a href="/article/2860.htm"
                                       title="Linux SSH免登录配置总结" target="_blank">Linux SSH免登录配置总结</a>
                                    <span class="text-muted">eksliang</span>
<a class="tag" taget="_blank" href="/search/ssh-keygen/1.htm">ssh-keygen</a><a class="tag" taget="_blank" href="/search/Linux+SSH%E5%85%8D%E7%99%BB%E5%BD%95%E8%AE%A4%E8%AF%81/1.htm">Linux SSH免登录认证</a><a class="tag" taget="_blank" href="/search/Linux+SSH%E4%BA%92%E4%BF%A1/1.htm">Linux SSH互信</a>
                                    <div>转载请出自出处:http://eksliang.iteye.com/blog/2187265 一、原理 
     我们使用ssh-keygen在ServerA上生成私钥跟公钥,将生成的公钥拷贝到远程机器ServerB上后,就可以使用ssh命令无需密码登录到另外一台机器ServerB上。 
     生成公钥与私钥有两种加密方式,第一种是</div>
                                </li>
                                <li><a href="/article/2987.htm"
                                       title="手势滑动销毁Activity" target="_blank">手势滑动销毁Activity</a>
                                    <span class="text-muted">gundumw100</span>
<a class="tag" taget="_blank" href="/search/android/1.htm">android</a>
                                    <div>老是效仿ios,做android的真悲催! 
有需求:需要手势滑动销毁一个Activity 
怎么办尼?自己写? 
不用~,网上先问一下百度。 
结果: 
http://blog.csdn.net/xiaanming/article/details/20934541 
 
 
首先将你需要的Activity继承SwipeBackActivity,它会在你的布局根目录新增一层SwipeBackLay</div>
                                </li>
                                <li><a href="/article/3114.htm"
                                       title="JavaScript变换表格边框颜色" target="_blank">JavaScript变换表格边框颜色</a>
                                    <span class="text-muted">ini</span>
<a class="tag" taget="_blank" href="/search/JavaScript/1.htm">JavaScript</a><a class="tag" taget="_blank" href="/search/html/1.htm">html</a><a class="tag" taget="_blank" href="/search/Web/1.htm">Web</a><a class="tag" taget="_blank" href="/search/html5/1.htm">html5</a><a class="tag" taget="_blank" href="/search/css/1.htm">css</a>
                                    <div>效果查看:http://hovertree.com/texiao/js/2.htm代码如下,保存到HTML文件也可以查看效果: 
<html>
<head>
<meta charset="utf-8">
<title>表格边框变换颜色代码-何问起</title>
</head>
<body&</div>
                                </li>
                                <li><a href="/article/3241.htm"
                                       title="Kafka Rest : Confluent" target="_blank">Kafka Rest : Confluent</a>
                                    <span class="text-muted">kane_xie</span>
<a class="tag" taget="_blank" href="/search/kafka/1.htm">kafka</a><a class="tag" taget="_blank" href="/search/REST/1.htm">REST</a><a class="tag" taget="_blank" href="/search/confluent/1.htm">confluent</a>
                                    <div>最近拿到一个kafka rest的需求,但kafka暂时还没有提供rest api(应该是有在开发中,毕竟rest这么火),上网搜了一下,找到一个Confluent Platform,本文简单介绍一下安装。 
这里插一句,给大家推荐一个九尾搜索,原名叫谷粉SOSO,不想fanqiang谷歌的可以用这个。以前在外企用谷歌用习惯了,出来之后用度娘搜技术问题,那匹配度简直感人。 
 
 环境声明:Ubu</div>
                                </li>
                                <li><a href="/article/3368.htm"
                                       title="Calender不是单例" target="_blank">Calender不是单例</a>
                                    <span class="text-muted">men4661273</span>
<a class="tag" taget="_blank" href="/search/%E5%8D%95%E4%BE%8B/1.htm">单例</a><a class="tag" taget="_blank" href="/search/Calender/1.htm">Calender</a>
                                    <div>         在我们使用Calender的时候,使用过Calendar.getInstance()来获取一个日期类的对象,这种方式跟单例的获取方式一样,那么它到底是不是单例呢,如果是单例的话,一个对象修改内容之后,另外一个线程中的数据不久乱套了吗?从试验以及源码中可以得出,Calendar不是单例。 
测试: 
  Calendar c1 = </div>
                                </li>
                                <li><a href="/article/3495.htm"
                                       title="线程内存和主内存之间联系" target="_blank">线程内存和主内存之间联系</a>
                                    <span class="text-muted">qifeifei</span>
<a class="tag" taget="_blank" href="/search/java+thread/1.htm">java thread</a>
                                    <div>1, java多线程共享主内存中变量的时候,一共会经过几个阶段,    
  lock:将主内存中的变量锁定,为一个线程所独占。 
  unclock:将lock加的锁定解除,此时其它的线程可以有机会访问此变量。 
  read:将主内存中的变量值读到工作内存当中。 
  load:将read读取的值保存到工作内存中的变量副本中。 
  </div>
                                </li>
                                <li><a href="/article/3622.htm"
                                       title="schedule和scheduleAtFixedRate" target="_blank">schedule和scheduleAtFixedRate</a>
                                    <span class="text-muted">tangqi609567707</span>
<a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/timer/1.htm">timer</a><a class="tag" taget="_blank" href="/search/schedule/1.htm">schedule</a>
                                    <div>原文地址:http://blog.csdn.net/weidan1121/article/details/527307 
import java.util.Timer;import java.util.TimerTask;import java.util.Date; 
/** * @author vincent */public class TimerTest { 
 </div>
                                </li>
                                <li><a href="/article/3749.htm"
                                       title="erlang 部署" target="_blank">erlang 部署</a>
                                    <span class="text-muted">wudixiaotie</span>
<a class="tag" taget="_blank" href="/search/erlang/1.htm">erlang</a>
                                    <div>1.如果在启动节点的时候报这个错 : 
{"init terminating in do_boot",{'cannot load',elf_format,get_files}} 
则需要在reltool.config中加入 
{app, hipe, [{incl_cond, exclude}]}, 
  
  
2.当generate时,遇到: 
ERROR</div>
                                </li>
                </ul>
            </div>
        </div>
    </div>

<div>
    <div class="container">
        <div class="indexes">
            <strong>按字母分类:</strong>
            <a href="/tags/A/1.htm" target="_blank">A</a><a href="/tags/B/1.htm" target="_blank">B</a><a href="/tags/C/1.htm" target="_blank">C</a><a
                href="/tags/D/1.htm" target="_blank">D</a><a href="/tags/E/1.htm" target="_blank">E</a><a href="/tags/F/1.htm" target="_blank">F</a><a
                href="/tags/G/1.htm" target="_blank">G</a><a href="/tags/H/1.htm" target="_blank">H</a><a href="/tags/I/1.htm" target="_blank">I</a><a
                href="/tags/J/1.htm" target="_blank">J</a><a href="/tags/K/1.htm" target="_blank">K</a><a href="/tags/L/1.htm" target="_blank">L</a><a
                href="/tags/M/1.htm" target="_blank">M</a><a href="/tags/N/1.htm" target="_blank">N</a><a href="/tags/O/1.htm" target="_blank">O</a><a
                href="/tags/P/1.htm" target="_blank">P</a><a href="/tags/Q/1.htm" target="_blank">Q</a><a href="/tags/R/1.htm" target="_blank">R</a><a
                href="/tags/S/1.htm" target="_blank">S</a><a href="/tags/T/1.htm" target="_blank">T</a><a href="/tags/U/1.htm" target="_blank">U</a><a
                href="/tags/V/1.htm" target="_blank">V</a><a href="/tags/W/1.htm" target="_blank">W</a><a href="/tags/X/1.htm" target="_blank">X</a><a
                href="/tags/Y/1.htm" target="_blank">Y</a><a href="/tags/Z/1.htm" target="_blank">Z</a><a href="/tags/0/1.htm" target="_blank">其他</a>
        </div>
    </div>
</div>
<footer id="footer" class="mb30 mt30">
    <div class="container">
        <div class="footBglm">
            <a target="_blank" href="/">首页</a> -
            <a target="_blank" href="/custom/about.htm">关于我们</a> -
            <a target="_blank" href="/search/Java/1.htm">站内搜索</a> -
            <a target="_blank" href="/sitemap.txt">Sitemap</a> -
            <a target="_blank" href="/custom/delete.htm">侵权投诉</a>
        </div>
        <div class="copyright">版权所有 IT知识库 CopyRight © 2000-2050 E-COM-NET.COM , All Rights Reserved.
<!--            <a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">京ICP备09083238号</a><br>-->
        </div>
    </div>
</footer>
<!-- 代码高亮 -->
<script type="text/javascript" src="/static/syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="/static/syntaxhighlighter/scripts/shLegacy.js"></script>
<script type="text/javascript" src="/static/syntaxhighlighter/scripts/shAutoloader.js"></script>
<link type="text/css" rel="stylesheet" href="/static/syntaxhighlighter/styles/shCoreDefault.css"/>
<script type="text/javascript" src="/static/syntaxhighlighter/src/my_start_1.js"></script>





</body>

</html>