7 ms·
Exploring the Kubernetes API with Curl
- dejj 6y agoAlso: Linux is so simple because you can configure it with text files. Welcome to the Turing Tarpit, where everything is possible, but nothing of interest is easy.
- TechBro8615 6y agoI can explore node_modules with ls.
- goldenkey 6y agoI can explore git with ls too!
- koolba 6y agoThat’s a legit thing. The local node_modules directory is a copy of the dependency so if you want to test a fix you can edit the files directly to try it out.
- TechBro8615 6y agoIt’s at least one copy of the dependency...
- kissgyorgy 6y agoSure it's easy to make HTTP requests to an HTTP REST-like API. That's not the complexity. Look at the data structures, how many fields a simple thing like a Pod have. It's actually insanely complex, and if you are using Kubernetes, you have to understand most of them. The author show the structure of every endpoint: /api/[version]/namespaces/[namespace]/[resource]/[name] How is that simple?
- fierro 6y agonot sure how anything more simple would be useful. We aren't writing Hello Worlds here.
- qbasic_forever 6y agoLook at what Kubernetes can do... it's beyond even an operating system, it's like if systemd controlled a whole datacenter. It handles everything too--networking, storage, processes, jobs, etc. Of course that's going to be a complex thing with a large surface area. The fact you can just curl into the API server with a consistent and discoverable (all OpenAPI) API is pretty darn amazing.
- takeda 6y ago> Look at what Kubernetes can do... With such criteria even a passenger jet is simple.
- wutbrodo 6y agoThe claim was that the _API_ is simple relative to the system's capabilities, including being discoverable and standardized (w openapi). If passenger jets had a comparable API you could use to ramp up to the level of competence that you can on k8s, that would be pretty amazing.
- matt-attack 6y agoWhat is a discoverable API?
- aliswe 6y agoI guess this means that you're able to learn how the API works by using the API to download metadata. In fact, one can generate a complete API client by pointing a script to a running kubernetes instance, which will generate all code for interacting with exactly that version. And the resulting client is huuuge. (That generation thingy is for some .net clients)
- 6y ago
- Havoc 6y agoI'm sure this has benefit to someone but it doesn't really answer my core "K8S is simple" question in my mind: Single node proxmox VM/LXC mix homeserver. Is learning K8S worthwhile? I can see it helping me on cloud tech (inherently multi node) yet seems like a net negative at home. It's one of those "it's popular & I could learn that, but what is the personal payoff for me here?"
- tw04 6y ago> Is learning K8S worthwhile? Unless you can use the knowledge for work or just want something you can spend endless hours tweaking/tinkering on, not at all, not even a little bit. It will be less robust and an order of magnitude more difficult to troubleshoot and keep updated. I work on k8s all day long. I welcome some actual responses contrary to my opinion. If he isn’t doing it for knowledge, k8s on a single node is a significant downgrade from proxmox for a home lab. He currently has containers, vms, robust storage, and an extremely easy to use GUI out of the box with proxmox. He gets none of that from k8s without significantly more effort.
- qbasic_forever 6y agoSingle node isn't going to buy you much over a basic docker-compose.yml setup, but IMHO you now have a home 'lab' to experiment and hone your skills. Helm charts, despite their flaws, when done well can be really simple and easy to install and maintain application stacks too. Just a couple CLI commands to get a selfhosted app setup with all of its dependencies like a database, ingress proxy, etc.
- remram 6y agoI find that Kubernetes is more complex than docker-compose, but still has advantages for production deployments. Things like rolling upgrades, config management, versatile services with label selectors (and readiness probes). I have been bitten multiple times by docker-compose reading a variable from my current shell environment instead of an env-file. I'm no fan of Helm though, templating structured files just feels wrong. It clashes a lot with the built-in "valueFrom:" stuff built into Kubernetes; why couldn't Helm use similar "helmVar:" and keep being YAML?
- justicezyx 6y agoArticles with title like this is disingenuous to my taste. And frankly, it's plainly wrong. The most natural and easy tasks are always exceedingly complex. If something really appears easy to interact with, it must be proportionally more complex.
- paxys 6y agoThis should be titled "Kubernetes API is so simple you can explore it with curl". Which is true. I really like the API consistency, clear resource schema, use of HTTP verbs and conventions, official SDKs and even the kubectl CLI. However, behind this simple and intuitive API there is still a massively complex and mostly unintuitive system which cannot be reduced to "just make some curl calls and you are good to go". While it is easy to do things in Kubernetes, figuring out what to do and why to do it is anything but.
- qbasic_forever 6y agoI've been working in distributed systems for 20 years and k8s is the best yet. The docs are quite good: https://kubernetes.io/docs/home/ https://kubernetes.io/docs/home/ The community is growing and despite the Google connection, it's not dominated or controlled by them. Distributed systems are a huge problem space to learn and IMHO I think too many people get frustrated trying to learn all of that, on top of all the k8s tooling and conventions. There's no real shortcut other than getting in and building experience. K8s is by far the easiest system yet to do that--spin up a cluster with kind right now (https://kind.sigs.k8s.io/ https://kind.sigs.k8s.io/), it will take 5 minutes, and start playing with the learning tutorials: https://kubernetes.io/docs/tutorials/kubernetes-basics/ https://kubernetes.io/docs/tutorials/kubernetes-basics/
- xienze 6y agoI think you’re both right. It is definitely the easiest and most intuitive distributed system, and it’s also difficult to understand how all the pieces fit together. Just getting a typical web app deployed requires a container for the app, a pod definition, a DB container, a stateful set, a persistent volume for DB and possibly app storage, a persistent volume claim, a service, an ingress, something like cert manager to to handle creating a cert and attaching it to the ingress, etc. It all makes sense when you’ve done it a few times but it can seem quite overbearing even to someone who’s a fan of docker-compose.
- fierro 6y ago
- wy35 6y agoOnce again, people are quick to read the title and jump into the comments to write their opinion. The article itself addresses that it clickbaited a little and it actually means the API.
- deleted 6y ago[deleted]