1. GVK 定义 GVK(group version kind): 资源组、资源版本、资源类型 表示 apps 组下 v1 版本 Deployment 类型的资源。 1 2 apiVersion: apps/v1 kind: Deployment 表示 core 组下 v1 版本 Pod 类型的资源。(没有组信息表示核心组) 1 2
1. 方法1,在本机的 IDE 来调试源码 如果你是 linux 系统,可以在 linux 中搭建一个 kubernetes 单机的集群,在此系统中安装 IDE(Goland) 来调试. 具体步骤如下: 1. 下载源码 (go 的版本要求 1.18.x)
1. install logstash refer to logstash document 2. logstash example config file 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 input { tcp { port => 12345 codec => "json_lines" } } filter{ grok { match => ["message", "%{TIMESTAMP_ISO8601:logdate}"]
1. install wsl open Microsoft Store, then search ubuntu and click to install it. open terminal 1 2 3 4 5 6 7 8 9 10 11 12 # list all linux subsystem wsl --list # set default linux subsystem, then you can input 'wsl' to inter system wsl --set-default ubuntu # enter default linux subsystem wsl # install cmake, g++, gcc,gdb cd /usr/local
1. 机器初始化设置 hostname 设置 1 2 hostnamectl ## 查看当前的hostname hostnamectl set-hostname node1 ## 设置主机名为node1 /etc/hosts 文件 和 DNS 配置 1 2 3 4 5 6 7 8 9 10 # k8s master 192.168.130.131 node1 # 更改dn
install nfs in docker 1. create share directory used by nfs 1 mkdir -p /home/ooooo/shared/nfs 2. create exports.txt used by nfs This the exports.txt mainly used to mount dir (path in the container ) and permission. for example: It indicates read only for all ip. 1 2 vim /home/ooooo/exports.txt /home/ooooo/shared/nfs *(ro,no_subtree_check) 3. execute docker command 1 2 3 4 5 6 7 8 9 10 11 12 13 docker run