k8s实践:使用 kwok 本地调试 kube-scheduler WebAssembly 插件及踩坑指南
使用 kwok 创建 k8s 集群
安装kwok
✗ brew install kwok✗ kwokctl --help
kwokctl is a tool to streamline the creation and management of clusters, with nodes simulated by kwok
Usage:
kwokctl [command] [flags]
kwokctl [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
config Manage [reset, tidy, view] default config
create Creates one of [cluster]
delete Deletes one of [cluster]
etcdctl etcdctl in cluster
export Exports one of [logs]
get Gets one of [artifacts, clusters, components, kubeconfig]
hack [experimental] Hack [get, put, delete] resources in etcd without apiserver
help Help about any command
kubectl kubectl in cluster
logs Logs one of [audit, etcd, kube-apiserver, kube-controller-manager, kube-scheduler, kwok-controller, dashboard, metrics-server, prometheus, jaeger]
scale Scale a resource in cluster
snapshot Snapshot [save, restore, record, replay, export] one of cluster
start Start one of [cluster]
stop Stop one of [cluster]
Flags:
-c, --config strings config path (default [~/.kwok/kwok.yaml])
--dry-run Print the command that would be executed, but do not execute it
-h, --help help for kwokctl
--name string cluster name (default "kwok")
-v, --v log-level number for the log level verbosity (DEBUG, INFO, WARN, ERROR) or (-4, 0, 4, 8) (default INFO)
--version version for kwokctl
Use "kwokctl [command] --help" for more information about a command.创建 k8s 集群
最快的方式
自定义集群配置
部署 kube-scheduler WebAssembly 插件
kube-scheduler 支持 WebAssembly 插件
编译 NodeNumber 调度插件
安装 tinygo 环境
编译 NodeNumber 调度插件为 wasm 文件
k8s集群自定义调度器配置
自定义调度器配置
重建 k8s 集群
踩坑指南
问题一:kube-scheduler 容器启动以后会一直重启?
问题二:kube-scheduler 容器启动还是会一直重启?
调度插件功能验证
一键扩容集群节点
创建 pod
Last updated
