可以通过配置:

使得rancher自动通过fluentd收集日志后发送到所配置的外部日志服务:

它可收集所有容器的stdout、stderr,以及node上 /var/log/containers/ 目录下的日志
DevOps
可以通过配置:
使得rancher自动通过fluentd收集日志后发送到所配置的外部日志服务:
它可收集所有容器的stdout、stderr,以及node上 /var/log/containers/ 目录下的日志
go的非常大的优势在于编译后是无依赖的,然而,如果go里面掺杂了c的代码(多半是要借助现有的c的类库),编译后的程序就有依赖了,就不能随便拿走运行了,还要安装依赖才能运行。
其实,c的程序也可以运行时无依赖的,就是所谓的静态编译,这个需要依赖库提供静态库文件;于是,cgo也能静态编译,使得编译后的程序无依赖。
尽管如此,静态编译是稍微麻烦一些的,所有的依赖库都需要有静态库文件,最终可能还是编译失败。
尝试一下mylg的静态编译:
1 |
go build --ldflags '--extldflags "-static -fpic"' . |
该工具依赖了libpcap
1 |
pip install $package_name |
1 |
pip list |
1 |
pip show $package_name |
1 |
pip show -f $package_name |
1 |
pip uninstall $package_name |
1 |
pip search $package_name |
1 |
pip -h |
1 |
pip sub-cmd -h |
1 |
. <(pip completion --bash) |
1 |
pip freeze |
1 |
pip check |
相关问题:
1 2 3 4 5 6 7 8 9 10 |
# pip show -f aliyuncli Name: aliyuncli Version: 2.1.9 Summary: Universal Command Line Environment for aliyun Home-page: http://docs.aliyun.com/?spm=5176.1829009.1002.1.LxlLfS#/pub/aliyun-command-line-interface Author: aliyun-developers-efficiency Author-email: aliyun-developers-efficiency@list.alibaba-inc.com License: UNKNOWN Location: /home/phpor/.local/lib/python2.7/site-packages Requires: colorama, jmespath |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
$ pip show -f aliyuncli Name: aliyuncli Version: 2.1.9 Summary: Universal Command Line Environment for aliyun Home-page: http://docs.aliyun.com/?spm=5176.1829009.1002.1.LxlLfS#/pub/aliyun-command-line-interface Author: aliyun-developers-efficiency Author-email: aliyun-developers-efficiency@list.alibaba-inc.com License: UNKNOWN Location: /home/phpor/.local/lib/python2.7/site-packages Requires: colorama, jmespath Files: ../../../bin/aliyun_completer ../../../bin/aliyun_zsh_complete.sh ../../../bin/aliyuncli ... |
https://www.kubernetes.org.cn/2737.html
方式一:
方式二:
1 |
set-alias which where.exe |
场景:
如何实现Windows机器上配置多个IP地址?
思考:
Linux上可以通过ip命令创建各种虚拟设备、子设备、配置IP等; Windows上如何实现呢?
Virtualbox 可以帮助我们实现这个,不仅可以配置虚拟机内部的网络,也可以给宿主机添加虚拟网络设备,不必为了拥有一个单独的IP就去启动一个虚拟机。
操作方法:
图形版本:
vboxmanage hostonlyif create
是的,不需要任何参数了,创建完了不符合口味的话,可以再编辑
vboxmanage list hostonlyifs
vboxmanage hostonlyif ifconfig <name> --ip 1.2.3.4 --netmask 255.255.255.0
–netmask 缺省为 255.255.255.0
vboxmanage hostonlyif remove <name>
在Powershell中设置:
1 |
Set-PSReadlineOption -EditMode Emacs |
使得Powershell中可以:
话说,上面那行在哪里设置?
就是Powershell中直接输入: $PROFILE 回车,就是这个文件
参考:
rancher集群初始状态:
1个 master + etcd +worker
1个worker
kube-apiserver进程为:
etcd进程为:
修改:
添加一个 etcd + master,上面的进程为:
kube-apiserver:
etcd进程:
出现的问题:
1 |
2018-11-27 08:44:26.674238 E | rafthttp: request cluster ID mismatch (got 3ab081c7572f57ca want e264d9f06628a989) |
rancher 2 etcd节点扩展为3 etcd节点:
1 |
rm -fr /var/lib/rancher/etcd/member/ |
思考:
1 |
--initial-cluster=etcd-k8s-node-3=https://192.168.56.34:2380 |
通过/etc/wsl.conf修改mount方式:添加 metadata选项
默认mount:
1 |
D: on /mnt/d type drvfs (rw,noatime,uid=1000,gid=1000) |
修改后:
原理:
本来,Windows的文件系统和Linux的文件系统是不一样的,Linux的文件的权限在Windows上是没有的,通过一个metadata选项就磨平了这个问题。
参考: