This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-09-11
Channels
- # announcements (1)
- # aws (2)
- # beginners (140)
- # boot (67)
- # cider (50)
- # clojure (64)
- # clojure-berlin (1)
- # clojure-conj (1)
- # clojure-france (2)
- # clojure-italy (2)
- # clojure-nl (8)
- # clojure-norway (6)
- # clojure-seattle (1)
- # clojure-spec (81)
- # clojure-sweden (2)
- # clojure-uk (131)
- # clojurescript (147)
- # clojutre (7)
- # cursive (40)
- # datomic (34)
- # editors (5)
- # emacs (7)
- # events (9)
- # figwheel (18)
- # figwheel-main (1)
- # fulcro (2)
- # instaparse (1)
- # jobs (3)
- # leiningen (1)
- # luminus (10)
- # lumo (1)
- # mount (6)
- # off-topic (12)
- # pedestal (4)
- # portkey (7)
- # re-frame (8)
- # reagent (21)
- # reitit (10)
- # ring-swagger (5)
- # shadow-cljs (140)
- # specter (4)
- # tools-deps (53)
- # uncomplicate (1)
Morning
@maleghast you could maybe try #devops ? It looks quiet in there, but you never know...
morning
@maleghast you know you can dry run a container and service definition using the cli and just redirect the output to a file?
can’t remember the flag
--dry-run
?
sorry if you already knew that, but I find that’s the easiest way to make sure the pods (deployment) and service link up correctly
Thanks @yogidevbear I will when I get to the office :-)
Also, thanks @alex.lynham I will try that too :-)
I often have had trouble connecting the deployment and service (leaky abstractions innit) so I find having a canonical working one helps as a template :)
There's an example at the top of here http://the-frey.github.io/2018/03/28/kubernetes-hacking
(sorry, on a train :))
I thought that I only needed an Ingress if I wanted a single LoadBalancer to route to many services
I think a service will just do loadbalancing between pods in k8s but not expose anything outside the cluster
and seeing as I only have one Pod it's not bothering to spin up the LoadBalancer..?
So other pods when they’re looking up your service will round trip all the ip addresses of pods with that name
Yeah, I know that, I created a Pod first, and then tried to expose it to the outside world by creating a Service.
So I’m pretty sure services aren’t exposed to the outside world. They’re just exposed to other things in the cluster
@firthh Here's my Pod File:
apiVersion: v1
kind: Pod
metadata:
name: foundation-beta
labels:
app: foundation
env: pre-prod
spec:
containers:
- name: foundation-beta
image:
ports:
- containerPort: 3080
That is definitely working, I can see that the container is started up properly in the logs and everything (K8s Dashboard UI)
@firthh - That Services are for exposing things to one another on-cluster makes a lot of sense now that you say it.
I don’t think I ever created pods directly, we used deployments which would manage the pods
OK... So there's one more thing... I want the inbound traffic to be plain HTTP on port 80 - can the Ingress handle proxy-ing to my container port (3080)?
I think the abstractions all make sense, but there are just lots of them to understand
Especially for scheduled transforms and data pulls. Scheduler is rather handy for all that.
I was listening to a podcast this morning about someone using fargate to handle scaling for bursty traffic and ECS/EKS for normal workloads. It was really interesting
yeah it's about 3-4x more p/hour than an instance. I'm making savings in other areas though by a large margin
@jasonbell - I am suddenly starting to think that Fargate might be an option while I get my head around K8s...
@maleghast Might be, really depends on the use case and I've not been reading much of the thread over the last 24 hours so I don't know all the deets.
I just need to get our first Containerised app deployed, and I really hated ECS so I was trying to do K8s (via Kops) instead...
I am starting on a road that leads to full automation, but I also just need to get the damn Container deployed... 😞
I am wondering if I kill the Kops-built cluster that I have created and just kick the Container (which is already on ECR) into use via Fargate while I accept that I need to learn more about K8s
Hey folks why do you use (:gen-class)
for ns’s which have your main in it?
Excuse my poorly worded question, ive not drunk my coffee yet
(for example do lein new app, and it generates a core.clj with a main method and gen-class at the top)
@guy - At the risk of being wrong / laughed at, I think that it's got something to do with creating Uberjars from the app.
Yeah i thought it was for ahead of time compilation? So it speeds up either the running or creation of uberjars?
I think that it needs to be there to show the tools where the "root" of the app is when building the Uberjar, but I may well have completely misunderstood.
@guy you can create a java class which can be run directly with the java
command (rather than as a script for the clojure runtime), and can also be the default jar class to run with java -jar
in an uberjar
sadly, that is a poor representation of an uberjar @danieleneal
it's more like this: https://4sonrus.com/wp-content/uploads/2016/07/The-Ultimate-Layered-Mason-Jar-Salad-768x1111.jpg
I thought it was more like this jar - https://media.giphy.com/media/CjlMkg9YHtW6s/giphy.gif
@maleghast if you use deployments rather than raw pods as well you get all the autoscaling goodness 🙂
https://blog.github.com/2018-09-10-highlights-from-git-2-19/ I always enjoy these
@alex.lynham - Yeah, I realised that based on a few people's comments and re-reading the docs with a new perspective.
@alex.lynham - I have my Container deployed as a Deployment now, but the Service I have is not being provisioned with the stuff in my .yaml file... It should be port 80, target port 3080 and it should be of type LoadBalancer, but what I get back when I run kubectl describe service foundation is info for a ClusterIP service on port 80 TargetPort 80... 😞
Makes no sense to me...
kind: Service
apiVersion: v1
metadata:
name: foundation
spec:
ports:
- protocol: TCP
port: 80
targetPort: 3080
selector:
app: foundation-beta
type: LoadBalancer
The above is what I am using and is straight off the K8s documentation, just with different values for the nodes (like name, port, targetPort)
but I get this when I run kubectl describe service foundation:
Name: foundation
Namespace: default
Labels: <none>
Annotations: <none>
Selector: app=foundation-beta
Type: ClusterIP
IP: 100.67.253.9
Port: <unset> 80/TCP
TargetPort: 80/TCP
Endpoints: 100.96.1.5:80,100.96.2.7:80
Session Affinity: None
Events: <none>
It's as if the type and targetPort I am specifying are just being completely ignored 😞
The only thing that I can think at this point is that the Cluster (created with Kops) does not have the relevant permissions to create ELBs..? Not sure how to fix that either 😞
That’s really strange then. I thought there might have been a default port and the issue was elsewhere
I am using the latest version of kubectl that I can get from AUR - there is a more recent version (I have 1.11.2 and the most recent version is 1.11.3), so I suppose that there may just be a bug in kubectl, but I feel reasonably sure that Google-ing this stuff would raise a LOT more results if that were the case.
is anyone aware of a map “restructuring” macro? eg: (restructure foo bar) => {:foo foo, :bar bar}
@peterwestmacott - I am afraid not; I am still living in that place where the first rule of macro club is... 😉
it wouldn’t be a particularly hard one to write, or particularly useful - I just wondered
any reason why mapv
as opposed to map
?
do you know why that is?
oh - I get it!
ProxyCommand looks a lot more complicated
did it work with tunnels too ?
Is it just me or does this seem like a really poor choice for a comic caption on a Clojure article? https://porkostomus.gitlab.io/posts-output/2018-09-11-Just-Juxt-28/
I’ve always thought its tricky to have humour/jokes/comics and portray a professional image. Someone is always going to dislike your blog because of it and therefore complain and make the content of your blog irrelevant. I don’t personally find the joke funny as its as funny as “your mum” level of jokes. But if its just some random persons blog i don’t really care either. Is it someone “important”?
I would consider that very inappropriate and unprofessional, yes.
FYI, here's the original (since he doesn't credit the cartoonist): http://spikedmath.com/525.html
(and quite a few of those are a bit NSFW, depending on your cultural norms)