Installing Go
- Install Go on the management and compute nodes.
- This section uses Go 1.18.3 as an example.
Procedure
- Use Xshell to log in to the server as the root user.
- Download Go 1.18.3 and upload it to the /root directory on the server.
- Delete the built-in Go software and then decompress the installation package uploaded in 2.
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.18.3.linux-arm64.tar.gz
- Add /usr/local/go/bin to the system environment variables.
export PATH=$PATH:/usr/local/go/bin
- Set the Go environment variables.
go env -w GO111MODULE=on go env -w GOPROXY=https://goproxy.cn,direct go env -w GOSUMDB=sum.golang.google.cn
- Check whether Go is successfully installed.
go version
If the Go version is displayed, the installation is successful.
Parent topic: Deploying the Kubernetes Cluster
