Slight variation of the Kubernetes example hello app.
- kustomize
>= 3.6
Create resources:
kustomize build . | kubectl apply -f -
Add the following line to the bottom of the /etc/hosts
file:
curl -H "Host: hello-world.info" $(minikube ip)
Expected output:
Hello, world!
Version: 1.0.0
Hostname: <host>
To update the app, change the image
field of the hello-deployment
:
- from
image: gcr.io/google-samples/hello-app:1.0
- to
image: gcr.io/google-samples/hello-app:2.0
.
kubectl set image -n hello deployment/hello-app hello-app=gcr.io/google-samples/hello-app:2.0
Alternatively edit the deployment directly and change the field manually:
kubectl edit deployments.apps -n hello hello-app