Kmeshctl Usage
Installation
- Installing from release binaries
Pre-built binaries are available on our releases page.
# For AMD64 / x86_64
[ $(uname -m) = x86_64 ] && curl -Lo ./kmeshctl https://github.com/kmesh-net/kmesh/releases/download/v0.5.0/kmeshctl-linux-amd64
# For ARM64
[ $(uname -m) = aarch64 ] && curl -Lo ./kmeshctl https://github.com/kmesh-net/kmesh/releases/download/v0.5.0/kmeshctl-linux-arm64
chmod +x ./kmeshctl
sudo mv ./kmeshctl /usr/local/bin/kmeshctl
- Installing from source
kmeshctl is still in rapid development. If you want to try latest features, you can directly build and install it from source.
# Clone source code from github
git clone https://github.com/kmesh-net/kmesh.git
# Build and install kmeshctl
cd kmesh/
make kmeshctl
chmod +x ./kmeshctl
sudo mv ./kmeshctl /usr/local/bin/kmeshctl
Usage
kmeshctl accesslog
Enable or disable Kmesh’s accesslog
kmeshctl accesslog [flags]
Examples:
# Enable Kmesh's accesslog:
kmeshctl accesslog <kmesh-daemon-pod> enable
# Disable Kmesh's accesslog:
kmeshctl accesslog <kmesh-daemon-pod> disable
kmeshctl dump
Dump config of ads or workload mode
kmeshctl dump [flags]
Examples:
# Ads mode:
kmeshctl dump <kmesh-daemon-pod> ads
# Workload mode:
kmeshctl dump <kmesh-daemon-pod> workload
kmeshctl log
Get or set kmesh-daemon’s logger level
kmeshctl log [flags]
Examples:
# Set default logger's level as "debug":
kmeshctl log <kmesh-daemon-pod> --set default:debug
# Get all loggers' name
kmeshctl log <kmesh-daemon-pod>
# Get default logger's level:
kmeshctl log <kmesh-daemon-pod> default
kmeshctl waypoint
A group of commands used to manage waypoint configuration
kmeshctl waypoint [flags]
Examples:
# Apply a waypoint to the current namespace
kmeshctl waypoint apply
# Generate a waypoint as yaml
kmeshctl waypoint generate --namespace default
# List all waypoints in a specific namespace
kmeshctl waypoint list --namespace default
- kmeshctl waypoint apply
Apply a waypoint configuration to the cluster
kmeshctl waypoint apply [flags]
Examples:
# Apply a waypoint to the current namespace
kmeshctl waypoint apply
# Apply a waypoint to a specific namespace and wait for it to be ready
kmeshctl waypoint apply --namespace default --wait
# Apply a waypoint to a specific pod
kmesh waypoint apply -n default --name reviews-v2-pod-waypoint --for workload
- kmeshctl waypoint delete
Delete a waypoint configuration from the cluster
kmeshctl waypoint delete [flags]
Examples:
# Delete a waypoint from the default namespace
kmeshctl waypoint delete
# Delete a waypoint by name, which can obtain from kmeshctl waypoint list
kmeshctl waypoint delete waypoint-name --namespace default
# Delete several waypoints by name
kmeshctl waypoint delete waypoint-name1 waypoint-name2 --namespace default
# Delete all waypoints in a specific namespace
kmeshctl waypoint delete --all --namespace default
- kmeshctl waypoint generate
Generate a waypoint configuration as YAML
kmeshctl waypoint generate [flags]
Examples:
# Generate a waypoint as yaml
kmeshctl waypoint generate --namespace default
# Generate a waypoint that can process traffic for service in default namespace
kmeshctl waypoint generate --for service -n default
- kmeshctl waypoint list
List managed waypoint configurations in the cluster
kmeshctl waypoint list [flags]
Examples:
# List all waypoints in a specific namespace
kmeshctl waypoint list --namespace default
# List all waypoints in the cluster
kmeshctl waypoint list -A
- kmeshctl waypoint status
Show the status of waypoints for the namespace provided or default namespace if none is provided
kmeshctl waypoint status [flags]
Examples:
# Show the status of the waypoint in the default namespace
kmeshctl waypoint status
# Show the status of the waypoint in a specific namespace
kmeshctl waypoint status --namespace default
kmeshctl version
Prints out build version info
kmeshctl version [flags]
Examples:
# Show version of kmeshctl
kmeshctl version
# Show version info of a specific Kmesh daemon
kmeshctl version <kmesh-daemon-pod>