Exposing a public service on Google Kubernetes Engine

To expose a service running on Google Kubernetes Engine to inbound traffic, create a LoadBalancer for the service like this:

kubectl expose deployment exampleservice --type=LoadBalancer --name=exampleservice

Once created, describe the service, and the LoadBalancer Ingress IP is your public IP for the service.

Google’s LoadBalancer service is charged per hour of usage and per GB of traffic. Check the docs for cost.

Restoring your PATH on MacOS

The inevitable happened and while adding/removing some utils to my path, I messed up my .bash_profile and ended up with a PATH where I couldn’t run any commands.

To recover, the default PATH on MacOS should be:

export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"

From here.