Follow the steps on the documentation
Kustomize Binary Installation guide
Install with homebrew
brew install kustomize
os=$(go env GOOS)
arch=$(go env GOARCH)
# download kubebuilder and extract it to tmp
curl -L https://go.kubebuilder.io/dl/2.3.1/${os}/${arch} | tar -xz -C /tmp/
# move to a long-term location and put it on your path
# (you'll need to set the KUBEBUILDER_ASSETS env var if you put it somewhere else)
sudo mv /tmp/kubebuilder_2.3.1_${os}_${arch} /usr/local/kubebuilder
export PATH=$PATH:/usr/local/kubebuilder/bin
domain=noroth.io
kubebuilder init --domain ${domain}
# create a custom resource definition for a counter
kubebuilder create api --group app --version v1beta1 --kind Counter
Add values for spec and status
If you want your status to be displayed with kubectl you need to add specific marker comments.
See Printer Columns
# Make sure you have a connection to a kubernetes cluster or minikube available
# Run some commands
make generate; make manifests
# install the CRDs
make install
kubectl apply -f config/samples/{resource}
## run the application
make run
See Documentation