Difficulty: Intermediate
Estimated Time: 1.5h

Kubernetes Workshop @ codecentric

Environment info

Please wait for the initial tasks to finish (i.e. the shell prompt to be ready) before doing anything :)

Docker registry

The Docker registry registry.workshop.breda.local is reachable from both nodes (and only from them). Example usage:

  • Push an image to the registry
    docker pull nginx
    docker tag nginx registry.workshop.breda.local/my-nginx-image
    docker push registry.workshop.breda.local/my-nginx-image
    
  • Run it in the cluster

    kubectl run nginx-test -lapp.kubernetes.io/part-of=example-3tier-app --image=registry.workshop.breda.local/my-nginx-image
    kubectl expose deployment nginx-test --type=NodePort --port=30099 --target-port=80
    kubectl patch svc nginx-test --type='json' -p '[{"op":"replace","path":"/spec/ports/0/nodePort","value":30099}]'
    
  • View it in the browser

Terminal Host 2