Over the past few months I’ve been trying to learn everything there is to know about Kubernetes. Kubernetes is an amazing technology for deploying and scaling containers though it comes with a cost. It’s an incredibly complex piece of software and there are a ton of bells and whistles to become familiar with. One way that I’ve found for coming up to speed is Joe Beda’s weekly TGIK live broadcast. This occurs each Friday at 4PM EST and is CHOCK full of fantastic information. In episode seventy-nine Joe discusses ytt and kapp. You can watch it here:
Here are some of my takeways from the episode:
- SMI (Service mesh interface) will provide an interface to cover common service mesh capabilities
- K14S is short for Kubernetes Tools
- Consists of several tools which follow the UNIX philosophy.
- Tools were designed to be small and chained together to get the expected outcome
- K14S consists of ytt, kbld, kapp and kwt
- Starlark is a python derivative that is intended to be a configuration language. Ytt uses it
- kbld can be used to build and push images
- ytt is a templating tool that understands YAML. Template in. YAML out.
- kapp is an enhanced kubectl apply
- kapp has the ability to parse a deployment, check the clsuter and tell you what is about to change. Nifty!
- You can use kapp to tell you what will happen when you apply a manifest:
kapp deploy -a foo -f manifestdir/
- The kubectl “–show-labels” option is a quick way to view all of the labels assigned to a resource:
kubectl get deploy --show-labels foo
- The kubectl “–prune” option can be used to delete unused resources. Use with caution!
- K14S uses labels to indicate this is a kapp managed application
- Application to label connectivity is stored in a ConfigMap
- Kapp can be used to restrict what you can do (e.g., only deploy to a given set of namespaces)
- Ytt can be used to define labels in one location and reference them elsewhere
- Show the parent / child relationship between resources:
kapp inspect -a app --tree
- Kapp can be used to show the differences between what is current and what is being deployed:
kapp deploy -c -a app -f yaml
- Tail the various logs associated with the application:
kapp logs -f -a app
- Definining a template with ytt:
#@ def labels():
- Referencing the label:
matchLabels: #@ labels()
labels: #@ labels()
This article was posted by Matty on 2019-10-18 00:00:00 -0500 -0500