Docs/CloudNative/Kubernetes/Kubebuilder/搭建环境.md
2022-10-18 16:59:37 +08:00

19 lines
No EOL
433 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

### 配置go
在环境变量中配置GO与GOPATH
```
GO=/item/go/bin
GOPATH=$HOME/source
PATH=$PATH:$GO:$GOPATH/bin
export PATH GOPATH
## 开启go module
export GO111MODULE=on
```
### 配置代理
```
go env -w GOPROXY=goproxy.cn,direct
```
### 配置kubebuilder
把kubebuilder移动到系统的可执行文件目录中/usr/bin,/usr/local/bin等在环境变量中配置命令补全
```
source <(kubebuilder completion bash)
```