Skip to content

niccoloraspa/kubernetes-hello-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

kubernetes-hello-app

Slight variation of the Kubernetes example hello app.

Tools

  • kustomize >= 3.6

Deploy the app

Create resources:

kustomize build . | kubectl apply -f -

Interact with the app (Minikube)

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>

Update app

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

Credits