Usage
Using kmesh-daemon
# Command 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")
# Enable ADS by default.
[root@openEuler ~]# kmesh-daemon -enable-kmesh
# Enable ADS and specify the path of the configuration file.
[root@openEuler ~]# kmesh-daemon -enable-kmesh -enable-ads=true -config-file=/examples/kmesh.json
# Disable ADS.
[root@openEuler ~]# kmesh-daemon -enable-kmesh -enable-ads=false
Using kmesh-cmd
# Command help
[root@openEuler ~]# kmesh-cmd -h
Usage of kmesh-cmd:
-config-file string
input config-resources to bpf maps (default "./config-resources.json")
# Manually load configurations.
[root@openEuler ~]# kmesh-cmd -config-file=/examples/config-resources.json
Using O&M Commands
# Command 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
# Read the loaded configurations.
[root@openEuler ~]# curl http://localhost:15200/bpf/kmesh/maps
[root@openEuler ~]# curl http://localhost:15200/options
Precautions
If
-enable-ads=true
is configured, Kmesh automatically receives orchestration rules from the service mesh control plane. In this case, do not run thekmesh-cmd
command to deliver rules to avoid repeated configurations.The
-bpf-fs-path
option is used to specify the path of the BPF file system of the OS. Data related to the Kmesh BPF program is stored in this path. The default path is/sys/fs/bpf
.The
-cgroup2-path
option is used to specify the cgroup path of the OS. The default path is/mnt/kmesh_cgroup2
.