- Kubebuilder (install instructions)
- Kustomize (install instructions)
- Kind (install instructions)
- Docker
- go
Make sure you install these listed tools via go and not your local package manager, this can lead to path issues.
To develop locally you'll need a kubernetes cluster installed. kind can setup a local cluster within docker.
After you have kind installed, follow the kind
Creating a Cluster and
Interacting With Your Cluster
instructions to get setup with a working local cluster. Be sure to set the environment variable
KIND_CTX
to the context created by kind, for example:
export KIND_CTX=kind-kind
You should now be able to run make docker-build kind
and have the controller run in your local cluster. The
namespace and CRD for use with kind is available in
config/samples/secrets_v1_syncedsecret.yaml. You can apply these using
kubectl apply -f config/samples/secrets_v1_syncedsecret.yaml --context kubernetes-admin@kind
.
Additionaly, to ensure all tests pass, run make tests
.
Here's what your flow would look like after
- do code changes
make docker-build kind
When you run make kind
above, a config map is added to your local kind cluster which contains the aws credentials
from the preview
profile on the host system. To use a different profile set the AWS_KIND_PROFILE
make variable.
Eg make AWS_KIND_PROFILE=staging docker-build kind