使用方法
kmesh-daemon使用
# 命令help
[root@openEuler ~]# kmesh-daemon -h
Usage of kmesh-daemon:
-bpf-fs-path string
bpf fs path (default "/sys/fs/bpf")
-cgroup2-path string
cgroup2 path (default "/mnt/kmesh_cgroup2")
-config-file string
[if -enable-kmesh] deploy in kube cluster (default "/etc/kmesh/kmesh.json")
-enable-ads
[if -enable-kmesh] enable control-plane from ads (default true)
-enable-kmesh
enable bpf kmesh
-service-cluster string
[if -enable-kmesh] TODO (default "TODO")
-service-node string
[if -enable-kmesh] TODO (default "TODO")
# 默认使能ads
[root@openEuler ~]# kmesh-daemon -enable-kmesh
# 使能ads,并指定配置文件路径
[root@openEuler ~]# kmesh-daemon -enable-kmesh -enable-ads=true -config-file=/examples/kmesh.json
# 不使能ads
[root@openEuler ~]# kmesh-daemon -enable-kmesh -enable-ads=false
kmesh-cmd使用
# 命令help
[root@openEuler ~]# kmesh-cmd -h
Usage of kmesh-cmd:
-config-file string
input config-resources to bpf maps (default "./config-resources.json")
# 手动加载配置
[root@openEuler ~]# kmesh-cmd -config-file=/examples/config-resources.json
运维相关命令使用
# 命令help
[root@openEuler ~]# curl http://localhost:15200/help
/help: print list of commands
/options: print config options
/bpf/kmesh/maps: print bpf kmesh maps in kernel
/controller/envoy: print control-plane in envoy cache
/controller/kubernetes: print control-plane in kubernetes cache
# 读取加载的配置
[root@openEuler ~]# curl http://localhost:15200/bpf/kmesh/maps
[root@openEuler ~]# curl http://localhost:15200/options
注意事项
-enable-ads=true时,Kmesh从服务网格控制面自动接收编排规则,此配置下,不要使用kmesh-cmd命令下发规则,避免多次配置。
-bpf-fs-path选项用于指定系统的bpf文件系统路径,kmesh bpf程序相关的数据会存放在该路径下,默认路径为/sys/fs/bpf。
-cgroup2-path选项用于指定系统cgroup路径,默认路径为/mnt/kmesh_cgroup2。
文档捉虫