Replace the image name incase you want to use ECR or some other registry. Search for k8s-issue-74839:latest, and replace it
using some IDE
OR
Use following command
MacOS
find . -type f \( -name "*.yaml" -o -name "*.yml" -o -name "*.sh" -o -name "*.go" -o -name "Makefile" \) -exec sed -i '' 's/k8s-issue-74839:latest/<image-name:tag>/g' {} +Linux
find . -type f \( -name "*.yaml" -o -name "*.yml" -o -name "*.sh" -o -name "*.go" -o -name "Makefile" \) -exec sed -i 's/k8s-issue-74839:latest/<image-name:tag>/g' {} +Verify once after running the commands above for the desired changes.
Docker
docker build . -t <image-name:tag>Podman
podman build . -t <image-name:tag>OR
use Makefile after replacing image name
make image
Later push this image to any artifactory like ECR or docker registry from where nodes can access this image.
- Create a cluster with at least 2 nodes.
- Deploy the app.
kubectl apply -f deploy.yamlOR
make deploy- Check if the server crashed
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
boom-server-59945555cd-8rwqk 0/1 CrashLoopBackOff 4 2m
startup-script 1/1 Running 0 2mNote : Replace the image name incase you want to use ECR or some other registry as images needs to be available on different nodes.
Use the setup script in order to deploy K8S components using MiniKube. Script adds dependencies necessary to run it locally such as kubectl, minikube and go. Current script use podman as default driver for setup.
./setup.shWhat if boom-server fails in local setup with Minikube ?
Script will create 3 node cluster, hence ensure custom images are properly available on each node. Manual fix is available below
podman save <image-name:tag> | minikube image load -How to build binary from Go code locally ?
You can also locally build the binary from Go source code
- Install golang latest version
- Install deps and build with following commands
make setup
make buildRepository is forked from : kubernetes/kubernetes#74839