云容器实例 CCI-使用client-go访问CCI的CRD资源Network:初始化项目

时间:2024-10-29 16:40:14

初始化项目

创建项目examples.com/cci-examples。

项目依赖k8s.io/client-go、k8s.io/code-generator,以下版本可供参考

  • k8s.io/client-go@kubernetes-1.15.0、k8s.io/code-generator@kubernetes-1.15.0
  • k8s.io/client-go@kubernetes-1.16.0、k8s.io/code-generator@kubernetes-1.16.0
  • k8s.io/client-go@kubernetes-1.17.0、k8s.io/code-generator@kubernetes-1.17.0
  • k8s.io/client-go@kubernetes-1.18.0、k8s.io/code-generator@kubernetes-1.18.0
  • k8s.io/client-go@kubernetes-1.19.0、k8s.io/code-generator@kubernetes-1.19.0
  • k8s.io/client-go@kubernetes-1.20.0、k8s.io/code-generator@kubernetes-1.20.0
mkdir -p examples.com/cci-examples
cd examples.com/cci-examples/
go mod init examples.com/cci-examples
go get k8s.io/client-go@kubernetes-1.15.0
go get k8s.io/code-generator@kubernetes-1.15.0
support.huaweicloud.com/sdkreference-cci/cci_09_0002.html