Today, I decided to play around a bit with the new local Kubernetes support in the new beta release of Docker for Mac. I decided to take the Project Riff Setup work done by Brian McClain from my Tech Marketing team and get it working on this new environment as a quick test of its functionality and usability. It’s actually REALLY easy to get started with the support. Once you download and install the Beta, you need to enable the support within Docker. You can find the settings inside the Docker Preferences panel.
Once installed and up and running, it pretty much acts like minikube in that you get a tiny K8S implementation to play around with. In order to test with Brians's stuff, I needed to make a few tweaks. (https://github.com/dbbaskette/riff-demos).
1) Obviously, the minikube install and start can be removed.
2) You have to change your context to "docker-for-desktop"
3) minikube has a nice command to output a formatted URL to access a service you have create. (minikube service --url demo-riff-http-gateway) I haven't found an equivalent type command for the Docker Kuberernetes solution, so I just dropped back to the kubectl cli to get the info I needed. The hostname/ip is easy...it can be localhost, but we need the port.
kubectl get svc demo-riff-http-gateway o=jsonpath='{.spec.ports[0].nodePort}'
will get that info for the service.
That's all you need to adjust to get these demos of Project Riff up and running on Docker for Mac - Kubernetes.
Comments
Post a Comment