This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-06-22
Channels
- # ai (1)
- # announcements (4)
- # babashka (23)
- # beginners (27)
- # biff (17)
- # calva (5)
- # clerk (6)
- # clj-commons (27)
- # clj-kondo (35)
- # clojars (12)
- # clojure (27)
- # clojure-denver (3)
- # clojure-europe (71)
- # clojure-norway (7)
- # clojure-spec (5)
- # clojure-uk (2)
- # clojurescript (45)
- # data-science (9)
- # datomic (4)
- # dev-tooling (2)
- # devcards (1)
- # hoplon (2)
- # hyperfiddle (36)
- # introduce-yourself (3)
- # malli (11)
- # missionary (2)
- # off-topic (63)
- # polylith (5)
- # rdf (2)
- # reagent (12)
- # schema (1)
- # shadow-cljs (11)
- # sql (6)
- # tools-deps (23)
- # xtdb (6)
gmƄning
this mornings fun : K8S HPA stopped getting metrics from the metrics-server, and the metrics-server itself went skewy, because of some mysterious auth errors... prometheus/grafana suffered similarly... the upshot was that yapster's API didn't scale in response to the getting-to-work load increase, the CPUs in the API containers were pegged (but we couldn't see that, 'cos no grafana) and API requests were queued (aleph/manifold) and taking long enough that clients timed out - but everything looked just fine in the API logs and cassandra telemetry. took me far longer to figure it out than it should have done!
https://erlang.org/documentation/doc-4.9.1/doc/design_principles/sup_princ.html
(try
(re-implement-erlangs-supervision-tree orchestrator-n)
(catch e ItWasTooHardException
(resume/logf "Cloud orchestrator %s experience!
Familiar with distributed systems, especially with
complexity regarding %s"
orchestrator-n e ))
@U04V5V0V4 i do like the small set of verbs operating on an open collection of nouns thing though
k8s operators let you use the same small set of verbs to manage new types of thing... we use them to uniformly manage kafka clusters, kafka topics, gnatsd clusters, elasticsearch clusters &c
Tbh I have been put off by the fact that helm charts exist ie a cottage industry in complexity management. But maybe itās got simpler?
@U0524B4UW oh I thought you mean RESTful architecture (uniform verb is good for heterogenous integration across organisation boundary?)
though HATEOAS (and the larger theme of semantics web) seems to me to remain a pipedream even in 2023ā¦
@U0524B4UW heard of operators (even played with some), but is there some place that clearly explain how itās different from just a helm chart deployment? my impression after reading various doc is that the point you mentioned isnāt emphasised nearly enough
@U0525KG62 lol the IT tech books I read on monitoring with prometheus/grafana specifically has a section on thatā¦ forgotten whatās in there though :man-shrugging:
@U04V5V0V4 helm charts put me off too - i chose not to use any for our deploy because they added what felt like too much complexity in an already unfamiliar (to me) domain - but they do address an abstraction problem with K8S (also targeted by kustomize)
K8S is undoubtedly complex - but a lot of that complexity is a reflection of the underlying domain - AWS, GCP &c, and i suspect the abstraction capabilities will improve over time e.g. operators were introduced a few years after K8S became a thing, kustomize is only since 1.14
@U6L5FFL95 an operator can give you new k8s nouns, e.g. here is yaml for a kafka topic from our system (it's the strimzi operator that defines the new noun in this case):
https://gist.github.com/mccraigmccraig/10ec06f56fe6e4a010b523dbaef1aab9
against which you can apply
, get
, describe
, delete
as with any other k8s resource...
e.g.
https://gist.githubusercontent.com/mccraigmccraig/4adbd5da9d59c756a859ea5bfe049a83/raw/27444eb2abe3d5e8c808a6c53928aefa0daa2fec/gistfile1.txt
want more partitions - change your topic yaml and apply
- the strimzi operator converges your deployment with kafka specific operations
i chose kafka topics as an example because the yaml for them is embarrassingly simple - but the same idea applies to more complex things - here's our elasticsearch logging cluster definition : https://gist.github.com/mccraigmccraig/92168f36c8aead55ddae2a108d2c8f8c
want more data nodes ? update the yaml ( https://gist.github.com/mccraigmccraig/92168f36c8aead55ddae2a108d2c8f8c#file-gistfile1-txt-L53 ) and apply
lemme think - seems like thereās something here, but Iām not sure how to put it into wordā¦
ā¦in the meantime, so is it that something like āperform a database backupā is also an example of a target to being āoperationalizedā?
@U6L5FFL95 yes - here's a cassandra operator which does just that : https://docs.k8ssandra.io/tasks/backup-restore/
(i haven't used it - cassandra operators were too new when i set up our cluster)
k8s is almost certainly overkill for a straightforward API+DB project - but if you throw in a few extra components - kafka and websockets (e.g. gnatsd) and batch jobs and a desire to avoid coupling yourself to a particular cloud then it makes a lot of sense
oh nevermindā¦ nothing a quick web search canāt solve: https://eskala.io/blog/what-are-the-differences-between-helm-and-operators/
(I also like the stackoverflow ans with the tagline: āCRD + Controller = operatorā (ok, maybe a bit more complex than that - operator also āencode and crystalize operational expertiseā, whatever that means))
though Iād also say that operator brings to mind the idea of a long-lived (at an org level) service
yeah that definition ( CRD + Controller = operator
) makes sense to me... and when you look at what resources an operator creates, it's usually just a deployment
or statefulset
for the controller, so turtles all the way down
@U6L5FFL95 the operator defines new resource types (CRDs) and the controller wraps complex ops processes on those CRDs into the k8s verbs
oh i seeā¦ so youāre saying that the power of the CRD + controller combo increases once you begin to actually, err, āProgramā in it
lol - not sure š - for me the power is that all manner of complex ops processes can be handled in a simple and uniform manner
the idea is actually pretty nice - it is when you implement it on a platform as sprawling and byzantine as kubernetes that makes it (ohno!)
but then, the container orchestration war is already in history textbook, itās too late if anyone donāt like k8s for whatever reasons
ha, in true https://www.juliadonaldson.co.uk/books/picture-books/a-squash-and-a-squeeze/ style you should try AWS CloudFormation for a bit and then go back to k8s š
i would go as far as š±
havenāt tried that. though my friends over there find that terraform state can get stuckā¦
(not exactly terraformās fault thoughā¦ likely to be the specific cloud vendor providerās)
anyway, I think my main complain on operator is that their docs (for some of the most prominent ones) doesnāt do a good job of illustrating things with a self-contained, end-to-end example to highlight operatorās advantages
yeah @U6L5FFL95 i won't even try and argue with that - my view on k8s was not acquired from the docs - iirc i came across the https://strimzi.io/ operator for kafka before i ever tried k8s, and seeing what it could do perked my interest
although the current k8s explanation of operators is pretty good : https://kubernetes.io/docs/concepts/extend-kubernetes/operator/
yup, so maybe rant a bit more (and off track too) - crossplane
, now thatās the real š±
I mean, as complexity of k8s approaches infinity, perhaps what ppl actually wants, in the limit, is their own self-hostable PaaS to get away from cloud vendor dependence
though it turns out that k8s itself is not a PaaS per se, but could be a substrate to build a PaaS on top of (the horrorā¦)
I am at times puzzled by why it seems that in spite of all the advances over the year, something as ābasicā as cloud/PaaS/IaaS etc remains essentially an unsolved problem once you go beyond the surface
ya thanks a lots @U0524B4UW - I came across this https://operatorframework.io/what/ a long time ago but donāt really know whatās going on for the tiniest bitā¦ with your explanation I seem to begin to āget itā (by an epsilon :rolling_on_the_floor_laughing:)
@U6L5FFL95 my current company (sona - took over yapster) runs on k8s - they ported their app from azure to GCP in a day, with no (well, the story says "no", so perhaps "approximately no") changes - so it worked pretty well as a portable PaaS for them
though I have doubts on how often does someone need to build its own operator. Seems like the use case will be much broader if āI have my bespoke custom fullstack application that I want to automate operations on in an end-to-end mannerā is a valid case for a custom operator
i think building an operator goes hand-in-hand with building an architectural component - it makes sense for e.g. datastax to build a cassandra operator, or confluence to build a kafka operator (or even AWS to build operators, since they are providing services at scale)... could also make sense for a company with a well-defined application to build their own operator for that application
but you don't need to rush in to building an operator ... you can go a long way with other operators and inbuild k8s nouns - i never considered building an operator for yapster, although now i'm thinking about it there are some ops tasks which require a bunch of kubectl
commands in the right order, which is probably the smell indicating you should build an operator
ya thatās exactly what Iām worrying about - many ppl learn about things in a hands-on way, so if building an operator is culturally seem as āsomething only big-name org doā, it would makes it harder to reach for ordinary folks
maybe for something at this high a level of abstraction, itās like what you said - on-ramping in an organic manner naturally is better