Ensure that docker is configured to use localhost:5000 as insecure registry https://docs.docker.com/registry/insecure/
minikube start
eval $(minikube docker-env)
docker run -d -p 5000:5000 --restart=always --name registry registry:2
mvn clean install -DskipChecks -DskipTests -DdockerBuild
docker tag docker-registry.somewhere.cz/myservice:1.5.0.BUILD-SNAPSHOT localhost:5000/myservice:1.5.0.BUILD-SNAPSHOT
docker push localhost:5000/myservice:1.5.0.BUILD-SNAPSHOT
kubectl apply -f namespace.yaml
kubectl apply -f rbac.yaml
kubectl apply -f myservice.yaml
Restart bezicich podu, s fetch policy Always
znamena, ze se aktualizuji vsechny pody:
kubectl rollout restart deployment.v1.apps/myservice
Zmena poctu bezicich podu sluzby:
kubectl scale deployment.v1.apps/myservice --replicas=1
kubectl rollout status deployment.v1.apps/myservice