Development Environment Setup¶
OK. So you want to get started with Golang/Kubernetes development. You've come to the right place. Read on.
1 Install Golang¶
Head to the official website and click the "Download" button:
Make sure you select the correct package according to your operating system and processor:
For Apple macOS users, click the apple logo in the menu bar, and choose "About This Mac" to check your chip:
2 Install Kubernetes¶
The easiest way to run a Kubernetes cluster locally is to run it in a Docker container.
2.1 Install Docker¶
Head to the official website and click the download button:
Again, please pay attention to the operating system and processor options. For Apple M1 mac users, choose the "Apple Chip" option. To check what processor you have, see the previous section in "About This Mac".
After installation, make sure Docker is up and running.
2.2 Install Minikube¶
Minikube is local Kubernetes, focusing on making it easy to learn and develop for Kubernetes.
All you need is Docker (or similarly compatible) container or a Virtual Machine environment, and Kubernetes is a single command away.
Note: there are other tools which can install a local K8s, such as
kind, etc.; here we choose one of the most famous tools that is minikube as the demo.
First, go to the official website of minikube, choose the right OS and architecture (again,) and download/install:
Alternatively, if you are using Homebrew (if you don't know what it is, ignore this line,) you can simply run
brew install minikube.
Go to Kubernetes' official documentation website and follow the guide to install kubectl. Choose your operating system:
Again, for macOS users, if you are using Homebrew package manager, you can install kubectl with Homebrew:
2.4 Start K8s¶
Note: if you would like to set Docker as the default driver for minikube, you can run:
Then next time when you want to start minikube, you can simply run
minikube startwithout the
2.5 Check K8s Status¶
minikube status, and you should get similar output:
$ minikube status minikube type: Control Plane host: Running kubelet: Running apiserver: Running kubeconfig: Configured
kubectl get node, and you should get similar output:
OK, now you have Golang and Kubernetes ready locally. Start coding!
3 Contribute to DevStream¶
and start from there!
For example, you can try a local build:
Or, maybe you would like to have a go with it first? Check our quickstart guide. Happy hacking!