-
Notifications
You must be signed in to change notification settings - Fork 86
Noobaa on Kubernetes Hands On
Danny Zaken edited this page Mar 3, 2019
·
6 revisions
- Start minikube:
minikube start
- Work with minikube's internal docker - useful for development so you don't need to constantly push\pull images
eval $(minikube docker-env)
# test by listing images - you'll see al kind of k8s images
docker images
- build noobaa server image - first download rpm from jenkins and copy to
noobaa.rpm
undernoobaa-core
, then run docker build
docker build -f ./src/deploy/NVA_build/Server.Dockerfile -t nbserver --rm --no-cache ./
- tag the image
docker tag nbserver nbserver:1
- update noobaa_statefulset.yaml to point to the image we just built
image: nbserver:1
- deploy noobaa yaml file in kubernetes
kubectl create -f src/deploy/NVA_build/noobaa_statefulset.yaml
- check that statefulset\service\pods are created
kubectl get statefulset
kubectl get pod
kubectl get service
- getting into the noobaa server
kubectl exec -it noobaa-server-0 /bin/bash
- connecting to the system from outside the cluster can be done by connecting to the service ip and the mapped port (can be found with
kubectl get service
)
another option is to forward ports80
and8080
from kuberentes to local host
sudo kubectl port-forward noobaa-server-0 80:80 8080:8080
- creating agents - copy agents yaml from the UI to a file and use
kubectl create -f [agents.yaml]
- build the operator. you must have
go
anddep
installed. this will build anoobaa-operator
image
./src/deploy/build_operator.sh
- tag the operator image
docker tag noobaa-operator noobaa-operator:1
- deploy the operator yaml in the cluster
kubectl create -f ./gocode/src/noobaa-operator/deploy/noobaa-operator.yaml
- deploy a
noobaa
resource in kuberentes
kubectl create -f src/deploy/NVA_build/noobaa.yaml
- another way to run the operator (mainly during the development of the operator itself) is locally on the laptop, instead of building an image and deploying to kubernetes
operator-sdk up local --namespace=default