News for hackers. Stuff that matters.
Re:Kubernetes 1.14 released by grantlmiller on Monday March 25, 2019 @09:01PM (#19488323)
The inclusion of Kustomize[1] into kubectl is a big step forward for the K8s ecosystem as it provides a native solution for application configuration. Once you really grok the pattern of using overlays and patches, it starts to feel like a pattern that you'll want to use everywhere (even outside of the k8s ecosystem).

I'm excited to see that the kubectl docs[2] are actually recommending -k as the default solution (vs -f).

  Though Apply can be run directly against Resource Config
  files or directories using -f, it is recommended to run
  Apply against a kustomization.yaml using -k. The 
  kustomization.yaml allows users to define configuration
  that cuts across many Resources (e.g. namespace).
Really amazing work from everyone on this release.

[1]https://kustomize.io

[2]https://kubectl.docs.kubernetes.io/pages/app_management/appl...

Re:Kubernetes 1.14 released by jsmeaton on Monday March 25, 2019 @10:49PM (#19488883)
In which situations would you consider using Kustomize over helm? Helm seems like a decent option for defining your app, especially if you’re using other helm dependencies.

I’m yet to deploy anything to a production k8s cluster, so I’m looking for opinions of people that know what they’re talking about.

Re:Kubernetes 1.14 released by littlekosh on Monday March 25, 2019 @11:35PM (#19489102)
Helm is great right up until you run into a chart that doesn’t support what you need, i.e. if you want to run on tainted nodes, it needs to support tolerations. Want to add a sidecar to a pod? No.

It also lies about the actual status of the installation. A deployment that applies successfully but has issues with the new pods coming up can still show successful.

The larger charts are a nightmare which isn’t helm’s fault but it doesn’t make things appreciably easier either.

Kustomize has a lot of warts too. If the type definition in k8s source doesn’t have a merge key defined, it’s going to overwrite the entire section of the resource. You can use JsonPatches to get around that problem but that is super gross too.

The entire ecosystem is trying to solve the same problem and no one has come up with the definitive way of doing it (because it’s a HARD problem) It seems like Helm templating and then passing to kustomize to add in the one-off changes is the direction a lot of people are heading but it’s more of a least-bad solution than a good one.

I will say, if you’re using helm templates for your own stuff, you very likely going to be happy with it.

Re:Kubernetes 1.14 released by jaxxstorm on Tuesday March 26, 2019 @12:04AM (#19489221)
This is a problem we got sick and tired of at $work, so we made kr8: https://github.com/apptio/kr8

You can define a component which you install into many clusters and then slightly differentiate them based on cluster parameters, kind of like Puppet or Chef (without the application stage)

Alongside this, you can actually patch helm charts. An example component can be found here https://github.com/jaxxstorm/kr8-cfgmgmt-example/blob/master...

The patches.jsonnet allows you to add a commandline flag that wasn't in the helm chart at one time.

Re:Kubernetes 1.14 released by littlekosh on Tuesday March 26, 2019 @12:09AM (#19489232)
Oh no, jsonnet!

Seriously though, gonna look closer at this tomorrow at the office. Thanks for the heads up!

Re:Kubernetes 1.14 released by jjeaff on Tuesday March 26, 2019 @12:40AM (#19489347)
You're just running helm charts directly from the public repo? I assume so since you say customization is a nightmare.

I use helm fetch and pull the charts with dependencies into my repo. Running direct from the public repo is a little bit too much like piping the contents of a url to bash without checking first.

You can then customize however you like.

When I want to update the charts, helm fetch it again and merge the changes.

Re:Kubernetes 1.14 released by alexellisuk on Tuesday March 26, 2019 @05:19AM (#19490253)
So you are forking and maintaining the helm templates.. :-/
Re:Kubernetes 1.14 released by jjeaff on Monday April 01, 2019 @06:56PM (#19549207)
Not really. I'm essentially just pinning the version and then checking the updates before upgrading.
Re:Kubernetes 1.14 released by grantlmiller on Tuesday March 26, 2019 @12:30AM (#19489312)
The pattern of Helm template + Kustomize is operationalized with Ship: https://github.com/replicatedhq/ship plus some other functionality to automate pull requests from upstream updates.
Re:Kubernetes 1.14 released by captn3m0 on Tuesday March 26, 2019 @02:00AM (#19489581)
Isn't it a native usecase as well? This is linked from the kustomize website as a valid usecase: https://testingclouds.wordpress.com/2018/07/20/844/

(Title = Customizing Upstream Helm Charts with Kustomize)

Re:Kubernetes 1.14 released by chupasaurus on Monday March 25, 2019 @11:31PM (#19489083)
> Helm seems like a decent option

If you want to: have PITA with RBAC, forget about manual changes because there are no 3-way-merge in Helm2 (that's what kubectl apply does, only hope it will be in Helm 3) and after this change helm cannot apply desired state, some of the biggest pains lasting for years had been resolved only in 2.13 with --atomic parameter.

Aside from dependency resolution, everything that Helm does could be made by any template engine + API caller.

Re:Kubernetes 1.14 released by halbritt on Tuesday March 26, 2019 @12:29AM (#19489307)
My team uses Helm extensively and will probably stick with it for the time being as it seems to have the most traction at the moment. As an example, MSSQL isn't a part of my core stack, but occasionally data engineers get databases from folks that they need to extract data from. Helm allows me to get one running in approximately 2 minutes or less. For many of the core components of our infrastructure we can deploy similarly quickly. We do our best to track stable for those charts. This is the tremendous advantage of helm.

Unfortunately, many of those stable charts for core infrastructure are barely POC-worthy and take a great deal of effort to get into production state. For example, there is no helm chart for Kafka with TLS support. Maybe not necessary for every production implementation, but dammit, this is 2019.

That said, helm is not safe. A helm "release" is not an artifact. It's a deployment of a helm chart of a certain version. That helm chart version may or may not correlate to the underlying version of the software you're running as that artifact is presumably defined with an "image" in values.

For example, I've run the same aforementioned MSSQL helm chart with 2017-CU7-ubuntu, 2017-CU8-ubuntu, and 2017-CU9-ubuntu tags. A quick "helm list" might show you the same chart version across three different environments but they're still very different.

Helm is not idempotent. Helm upgrade is a nightmare. One has to perform a helm upgrade to set values. Helm upgrades often fail. Even though they report failure, a look under the hood reveals that it actually succeeded.

Occasionally a helm upgrade blows away the persistent volume attached to a stateful thing. That's always the best.

tl;dr helm is the most popular, but has some massive shortcomings so we're all looking for something to replace it and kustomize is exciting because it's now for better or worse part of the core.

Re:Kubernetes 1.14 released by jpgvm on Tuesday March 26, 2019 @06:36AM (#19490576)
I really wish they didn't include this. Whilst kustomize is infinitely better than helm neither are good tools. That said if there was a choice between the 2 kustomize wins hands down I guess.
Re:Kubernetes 1.14 released by ses1984 on Tuesday March 26, 2019 @07:09AM (#19490692)
What's a good tool then?
Re:Kubernetes 1.14 released by SirensOfTitan on Tuesday March 26, 2019 @08:50AM (#19491278)
I really like kubecfg--it's an unopinionated powerful tool that uses jsonnet to describe k8s resources. I really tried to make kustomize work but I found it really, really rigid.

I am, however, not sure what kubecfg's future is: ksonnet (its way more complicated cousin) is being deprecated.

Re:Kubernetes 1.14 released by dijital on Tuesday March 26, 2019 @09:00AM (#19491340)
Re: ksonnet deprecation: I heard from some of the CoreOS team at a Prometheus Meetup recently that ksonnet is not exactly being deprecated.

Heptio (the owners of ksonnet) were bought by VMWare and will no longer maintain it. But it's possible the CoreOS guys will take ownership since they use it heavily in some of their tools.

Re:Kubernetes 1.14 released by bogomipz on Tuesday March 26, 2019 @12:26AM (#19489298)
Is Kustomize a native alternative to Helm then?
Re:Kubernetes 1.14 released by shaklee3 on Tuesday March 26, 2019 @01:13AM (#19489462)
Helm provides different capabilities. The chart functionally allows you to install and manage deployments with the intent that it's little work. It also has a templating engine that can work with or without the charts.

Kustomize is purely hierarchical templates.

Re:Kubernetes 1.14 released by nouney on Tuesday March 26, 2019 @04:02AM (#19489975)
Yes it is. You can do more with Kustomize
Re:Kubernetes 1.14 released by bogomipz on Tuesday March 26, 2019 @04:36PM (#19495773)
Interesting these two responses seem to contradict each other no?
Re:Kubernetes 1.14 released by moltar on Tuesday March 26, 2019 @07:43AM (#19490802)
I’m liking two other projects in the same space:

- kosko

- pulumi