Running the storage operator locally¶
Requirements¶
Go (1.13 or higher) and operator-sdk (0.17 or higher): to build the Kubernetes Operators
Mercurial: some Go dependencies are downloaded from Mercurial repositories.
Prerequisites¶
You should have a running Metalk8s cluster somewhere
You should have installed the dependencies locally with
cd storage-operator; go mod download
Procedure¶
Copy the
/etc/kubernetes/admin.conf
from the bootstrap node of your cluster onto your local machineDelete the already running storage operator, if any, with
kubectl --kubeconfig /etc/kubernetes/admin.conf -n kube-system delete deployment storage-operator
Get the address of the Salt API server with
kubectl --kubeconfig /etc/kubernetes/admin.conf -n kube-system describe svc salt-master | grep :4507
Run the storage operator with:
cd storage-operator
export KUBECONFIG=<path-to-the-admin.cong-you-copied-locally>
export METALK8S_SALT_MASTER_ADDRESS=https://<ADDRESS-OF-SALT-API>
operator-sdk up local