juice-shop/multi-juicer

Multi Juicer in an offline network

infosecirvin opened this issue · 2 comments

Multijuicer stops working within an offline network environment. The following steps were followed to install:

sudo apt install docker.io docker-compose -y
sudo snap install kubectl --classic
sudo curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
sudo curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube
minikube start
kubectl cluster-info
helm repo add multi-juicer https://iteratec.github.io/multi-juicer/
helm install multi-juicer multi-juicer/multi-juicer
kubectl get pods
wget https://raw.githubusercontent.com/iteratec/multi-juicer/main/guides/k8s/k8s-juice-service.yaml
kubectl apply -f k8s-juice-service.yaml
kubectl port-forward --address 0.0.0.0 service/juice-balancer 3000:3000

When the system is brought into the isolated network, started with kubectl port-forward --address 0.0.0.0 service/juice-balancer 3000:3000 and a client attempts to connect, here is the result:

Screenshot 2023-05-20 at 3 16 28 PM

Any ideas?

Hi!
Can you check if the pods are actually starting?
I think they might not be, as the default image pull policy is set to Always: https://github.com/iteratec/multi-juicer/blob/main/helm/multi-juicer/values.yaml#L5 and you don't seem to be overwriting it.

When you are running this without network access you'll have to preload the images beforehand and install MultiJuicer with setting the imagePullPolicy to Never or IfNotPresent.

helm upgrade --install multi-juicer multi-juicer/multi-juicer --set="imagePullPolicy=Never"

Other than that there shouldn't be anything blocking multi-juicer from running in a offline network setting, probably a issue with the cluster setup. (I don't use minikube, not sure 🤷‍♂️)

Tested with kind, works completely normally:

docker pull kindest/node:v1.27.1@sha256:b7d12ed662b873bd8510879c1846e87c7e676a79fefc93e17b2a52989d3ff42b

helm pull multi-juicer/multi-juicer --version 5.3.0

# preload required images
docker pull iteratec/progress-watchdog:v5.3.0
docker pull iteratec/cleaner:v5.3.0
docker pull iteratec/juice-balancer:v5.3.0
docker pull bkimminich/juice-shop:v14.5.1

# going offline

# creating cluster
kind create cluster --image kindest/node:v1.27.1@sha256:b7d12ed662b873bd8510879c1846e87c7e676a79fefc93e17b2a52989d3ff42b

# loading images onto kubernetes node
kind load docker-image iteratec/progress-watchdog:v5.3.0
kind load docker-image iteratec/cleaner:v5.3.0
kind load docker-image iteratec/juice-balancer:v5.3.0
kind load docker-image bkimminich/juice-shop:v14.5.1

helm install mj ./multi-juicer-5.3.0.tgz --set="imagePullPolicy=Never"

kubectl port-forward svc/juice-balancer 3000:3000

Thank you for your help; your instructions were perfect for solving this issue.