Liveblog by Quinn Slack (@sqs)
Kelsey Hightower (@kelseyhightower) is a technologist and Googler who regularly comes up with refreshing new ideas for using Go and deploying software. We live-blogged his talk at GopherCon 2017 about self-deploying Go applications using Kubernetes.
Note: This post was best-effort live-blogged at the conference. Let me know on Twitter (@sqs) if I missed anything. Any mistakes or misrepresentations are my fault; Kelsey’s tutorial was excellent!
Kelsey opened his talk with a discussion of why it’s hard to deploy software. He’s right—even though it’s 2017, it’s strangely difficult! Lucky for us, smart folks (including Kelsey) are working on the problem.
Kelsey presented an intriguing approach in his kargo project: Go apps that deploy themselves to Kubernetes. That is, instead of manually containerizing and deploying your Go static binary entry point
hello-world -http=:80 to your Kubernetes cluster, what if you could just open your local terminal and run
hello-world —kubernetes —replicas 5 to deploy it?
Think it sounds like a radical idea? It’s not (very) conceptually different from how executables interact with the OS kernel.
Here’s the local execution process:
Why not build programs that run like this?
To be specific, in step 2 above, the program would communicate with your Kubernetes’ cluster’s API to create a new deployment for itself.
These answers are a combination of Kelsey’s answers and my (@sqs’s) editorializing. Blame me for inaccuracies.
hello-worldis a macOS binary, but your servers run Linux? Answer: Go makes it easy for a program to recompile itself for a different architecture!