FY18P20Labs

View the Project on GitHub

Containers Orchestrator hands-on lab with Kubernetes

Deploying a Pod and Service from a public repository

The following steps can be used to quickly deploy an image from DockerHub (a public repository) that is made available via Azure external load balancer.

The kubectl get services command will show the EXTERNAL-IP as ‘Pending’ until a public IP is provisioned for the service on the load balancer. Once the EXTERNAL-IP is assigned you can use that IP to render the nginx landing page.

kubectl run nginx --image nginx
kubectl get pods
kubectl expose deployments nginx --port=80 --type=LoadBalancer
kubectl get services

You can also enable access to the k8 web UI console via local proxy

kubectl proxy

The output will note the port that the proxy binds to. The console will then be available at that port on localhost. e.g. http://localhost:8001/ui

NOTE: This will only work when running locally, and not if you’re using the Azure CLI

Lab Navigation

  1. Lab Overview
  2. Kubernetes Installation on Azure
  3. Hello-world on Kubernetes
  4. Experimenting with Kubernetes Features
    1. Placement
    2. Reconciliation
    3. Rolling Updates
  5. Deploying a Pod and Service from a public repository <– You are here
  6. Create Azure Container Service Repository (ACR)
  7. Enable OMS monitoring of containers
  8. Create and deploy into Kubernetes Namspaces

Back to Index