Live data from Hacker News

Kubernetes YAML Generator

k8syaml.com

91–100 of 127 posts

Re: Kubernetes YAML Generator

#91

Earlier quoted context omitted.

I've always felt that Kubernetes isn't appropriate for most businesses to use directly, but rather it's a platform for simpler platforms--someone like Heroku would build on top of Kubernetes and expose a much simpler interface for their users so they don't have to think about SSL, DNS, logging, load balancing, auto-scaling, etc. Alternatively, maybe the problem is solved with "distributions" of Kubernetes analogous t…

That's exactly what I am doing with https://primcloud.com :)

This seems really cool; I was poking around, but half of the links in your footer are broken (presumably placeholders for future pages?).

Re: Kubernetes YAML Generator

#92
post #24

I wonder what the need for tools such as this or other "Kubernetes-by-example" type pages tell us about the complexity of configuring Kubernetes resources. Do we need a better layer of abstraction, i.e. better adoption and tighter integration for something like kustomize? Have we fucked up completely with Kubernetes due to it being outrageously complicated for simple tasks? How we redesign this to be simpler? Is the…

IMO it needs two things: - a dedicated editor with intelligent autocomplete - stop using YAML, it soon becomes unreadable. JSON is easier to grok.

JSON is easier to grok.

For anything non-trivial you will want inline comments.

Also while any JSON can be expressed in YAML, the reverse is not true.

Re: Kubernetes YAML Generator

#93
post #82

Earlier quoted context omitted.

Helm has been doing this since the early days. 99% of our charts are created using: * `helm create` to get the default scaffold * modify a handful of entries in the generated values file * done! Only thing is the default helm chart starter does not allow for autoconfiguring of volumes, and since we're porting a lot of stateful apps to kubernetes we just modified the default starter to include that capability. Of cour…

As someone attempting to port a docker-compose application to a Helm chart I'd love to hear more about the resources you used. As someone working with a very simple application I've found the processes to be more difficult than I anticipated.

Kubernetes will be far more complex than docker compose. It'll let you do much, much more also.

Some potentially useful tips:

* One docker container usually maps to one pod, which is created by a deployment. You can put multiple containers in a single pod, but this couples them together tightly.

* Use services to assign hostnames to pods

* Have pods communicate to each other using the service names. This works the same as putting them in the same docker network.

* Volumes depend on your cloud provider or if you're running on bare metal. In the cloud it's easy, you just request one and it gets created on demand and backed by a cloud disk.

* If you're using volumes, you probably want to use the Recreate updatePolicy for your deployment. This will ensure the old pod is shutdown before creating a new one. Which is necessary to work with block volumes.

When using helm start with a `helm create CHARTNAME` and take a look at what it generated for you. You'll get some heavily templated yaml that if you're lucky you will barely have to touch.

But it's best to go through these tutorials and learn how to use the basic building blocks of kubernetes directly: https://kubernetes.io/docs/tutorials/kubernetes-basics/

Once you're familiar with what a Deployment, Service, Ingress and PersistentVolumeClaim are you can use helm to template this for you where necessary.

Re: Kubernetes YAML Generator

#94
post #24

I wonder what the need for tools such as this or other "Kubernetes-by-example" type pages tell us about the complexity of configuring Kubernetes resources. Do we need a better layer of abstraction, i.e. better adoption and tighter integration for something like kustomize? Have we fucked up completely with Kubernetes due to it being outrageously complicated for simple tasks? How we redesign this to be simpler? Is the…

I think of Kubernetes as "the new Operating System", and these complex resources as fiddling with initscripts, fstab, /etc/interfaces, and so on. Writing an operator is like writing your own initscript. I wouldn't be surprised if we eventually see new abstractions for "you just want a plain 'ol deployment with CI/CD du jour, a persistent volume claim, and a service ingress, just like 90% of all other CRUD webapps? Su…

And the tower of ever more obscure abstractions just keeps on growing. Until one of these fragile layers starts to malfunction and the whole thing comes tumbling down and nobody has a clue how to fix it all up.

Collectively, as an industry we have gone insane.

Re: Kubernetes YAML Generator

#95

Earlier quoted context omitted.

IMO it needs two things: - a dedicated editor with intelligent autocomplete - stop using YAML, it soon becomes unreadable. JSON is easier to grok.

JSON is easier to grok. For anything non-trivial you will want inline comments. Also while any JSON can be expressed in YAML, the reverse is not true.

> For anything non-trivial you will want inline comments.

Yes, JSON needs comment support back.

> Also while any JSON can be expressed in YAML, the reverse is not true.

This is a feature not a bug.

Re: Kubernetes YAML Generator

#96
post #24

I wonder what the need for tools such as this or other "Kubernetes-by-example" type pages tell us about the complexity of configuring Kubernetes resources. Do we need a better layer of abstraction, i.e. better adoption and tighter integration for something like kustomize? Have we fucked up completely with Kubernetes due to it being outrageously complicated for simple tasks? How we redesign this to be simpler? Is the…

Complexity always exists somewhere. You can't remove it, only try it make it easier to deal with. What Kubernetes allows you to do is very complex so you need a capable system to express it all. YAML isn't always the best but it works fine for most and tools like these are very helpful. Do you use an IDE? Does that mean the language and framework is too complex? No, it's just a tool to help you get things done. More…

>Complexity always exists somewhere. You can't remove it, only try it make it easier to deal with.

This is simply not true. Most complexity in today's systems is completely avoidable. Most developers are just mentally stuck and don't even try. "Managing" complexity is a great way to achieve job security without becoming good at anything specific. Instead of learning how to design system people are learning how to write config files.

Re: Kubernetes YAML Generator

#97
post #24

I wonder what the need for tools such as this or other "Kubernetes-by-example" type pages tell us about the complexity of configuring Kubernetes resources. Do we need a better layer of abstraction, i.e. better adoption and tighter integration for something like kustomize? Have we fucked up completely with Kubernetes due to it being outrageously complicated for simple tasks? How we redesign this to be simpler? Is the…

IMO it needs two things: - a dedicated editor with intelligent autocomplete - stop using YAML, it soon becomes unreadable. JSON is easier to grok.

> a dedicated editor with intelligent autocomplete

A.K.A. a schema file that a general purpose editor can consume. Please don't make me use some single-purpose editor just for autocomplete.

Re: Kubernetes YAML Generator

#98
post #57

Earlier quoted context omitted.

> I can't write a deployment yaml without googling or copy/pasting What about Nginx or Apache configuration files? Could you write them without googling?

What about Nginx or Apache configuration files? Could you write them without googling? Easily, because noone writes them from scratch, they just modify the default one. For most of my Kubernetes work I "kubectl describe" something existing into YAML, modify it, then "kubectl apply" it back again.

You can do this without a cluster also:

  kubectl create deployment my-deployment --image nginx --dry-run -oyaml

Re: Kubernetes YAML Generator

#99

Earlier quoted context omitted.

IMO it needs two things: - a dedicated editor with intelligent autocomplete - stop using YAML, it soon becomes unreadable. JSON is easier to grok.

> a dedicated editor with intelligent autocomplete A.K.A. a schema file that a general purpose editor can consume. Please don't make me use some single-purpose editor just for autocomplete.

Kubernetes schema files and a way to run them can be found at https://www.kubeval.com/

Re: Kubernetes YAML Generator

#100
post #82

Earlier quoted context omitted.

Helm has been doing this since the early days. 99% of our charts are created using: * `helm create` to get the default scaffold * modify a handful of entries in the generated values file * done! Only thing is the default helm chart starter does not allow for autoconfiguring of volumes, and since we're porting a lot of stateful apps to kubernetes we just modified the default starter to include that capability. Of cour…

As someone attempting to port a docker-compose application to a Helm chart I'd love to hear more about the resources you used. As someone working with a very simple application I've found the processes to be more difficult than I anticipated.

You can give a shot at kompose (https://github.com/kubernetes/kompose) It will convert your docker-compose.yml to kubernetes automatically
Post reply on HN