I enjoy watching the different approaches people take to managing #Kubernetes resources. @PulumiCorp is the best tool for managing k8s that I’ve found, and it’s why I joined them! Let’s take a quick tour through the features that set it apart... [thread]
Use the full k8s API surface - Each of Pulumi’s k8s SDKs (TypeScript, Python, .NET and Go) are generated from the OpenAPI spec. This is critical because it means that resource definitions in any language are a 1:1 match with the upstream API.
Manage k8s clusters - With Pulumi, you can manage every layer of your stack, including Kubernetes clusters! Check out this example where we create clusters on AWS, AKS, and GKE, and then deploy an app to all of them. https://www.pulumi.com/blog/multicloud-app/
Strongly typed resources - A tricky part about defining k8s resources in YAML/JSON is the lack of typing. It's hard to track typos and you have to apply the resource to a cluster to get any feedback. Pulumi helps here by showing type information right in the SDK.
Use existing YAML manifests - Many of us already have a pile of YAML k8s definitions to manage. Manage these manifests directly; no conversion needed! Pulumi shows detailed previews and allows you to run arbitrary transformations on the YAML before it is applied.
Helm support - Pulumi lets you manage Helm charts similarly to our YAML support. It’s common for orgs to fork upstream charts to customize a few values, but this can often be avoided with the use of transformations in Pulumi.
Readiness logic - Pulumi includes readiness logic to help you understand when your k8s resources are ready. This makes it easy to integrate k8s workflows into CI systems! Unlike `kubectl apply`, Pulumi doesn’t indicate success until all of the resources are ready to go.
Conditional logic - Another big drawback of YAML is the lack of conditional logic. It’s common to change parameters depending on the environment, but this usually calls for separate tools to template your YAML. With Pulumi, this logic can go right into your resource definitions.
Deprecation warnings - Pulumi warns you if you’re using k8s resources with deprecated apiVersions, and gives you info about which versions remove them entirely. Don’t be caught by surprise when you upgrade your clusters!
kx library - Our kubernetesx library makes it easier to manage k8s resources by abstracting away a lot of the boilerplate. This dramatically cuts the amount of code you need to write, while still giving you access to the full API surface if you need it. https://www.pulumi.com/blog/kubernetes-yaml-generation/
YAML export - Pulumi lets you export YAML manifests from the resource definitions in your program. This can be useful for integrating with other systems that expect k8s YAML.
...and so much more. That was a lot of info, but I’m still only scratching the surface of Pulumi here. If you’re interested in learning more, check us out at http://pulumi.com  and join our community slack. [end thread]
You can follow @levi_blackstone.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: