May 2018
Intermediate to advanced
554 pages
13h 51m
English
We might also want to create an external IP address for the nginx deployment. On cloud providers that support an external load balancer (such as Google compute engine), using the LoadBalancer type will provision a load balancer for external access. On the other hand, you can still expose the port by creating a Kubernetes service as follows, even though you're not running on platforms that support an external load balancer. We'll describe how to access this externally later:
// expose port 80 for replication controller named my-first-nginx$ kubectl expose deployment my-first-nginx --port=80 --type=LoadBalancerservice "my-first-nginx" exposed
We can see the service status we just created:
// get all services ...
Read now
Unlock full access