使用 kuberbuilder 初始化项目

代码在: https://github.com/tangx/kubebuilder-zero-to-one

1
2
kubebuilder init --domain tangx.in               
kubebuilder create api --group myapp --version v1 --kind Redis
1
2
3
4
5
6
7
8
9
apiVersion: myapp.tangx.in/v1
kind: Redis

metadata:
  name: my-op-redis

spec:
  replicas: 1
  port: 3333
1
2
3
4
5
# 安装
make install

# 卸载
make uninstall

查看 crd

1
2
3

k get crd |grep tangx.in
    redis.myapp.tangx.in                       2021-11-19T06:16:43Z