Slides used for the introduction to my Birds of a Feather session at KubeCon EU in Berlin. A discussion of various approaches to using programming languages to configure Kubernetes rather than writing the raw data.
data-only format such as JSON or YAML, and programmatic modification of this data should be done in a real programming language Gareth Rushgrove Borg, Omega, and Kubernetes, ACM Queue, Volume 14, issue 1 http://queue.acm.org/detail.cfm?id=2898444 “
$ ./kubeplay kubeplay (namespace="*")> pods # list pods in the cluster <list-of-pods> kubeplay (namespace="*")> @pod = _.any # pick a random pod from the list kubeplay (namespace="*")> puts @pod.to_json # output the pod definition { "metadata": { ... }, "spec": { ... "containers": [ {
"mypod" { # Required, must link on the corresponding "kubernetes_cluster" data s cluster = "${data.kubernetes_cluster.main.cluster}" collection = "pods" name = "mypod" labels { a = "b" } }