I'm now a master at kubernetes
Vložit
- čas přidán 13. 02. 2024
- My Courses
📘 T3 Stack Tutorial: 1017897100294.gumroad.com/l/j...
My Products
📖 ProjectPlannerAI: projectplannerai.com
🤖 IconGeneratorAI: icongeneratorai.com
📝 ThumbnailCritique: thumbnailcritique.com
Useful Links
💬 Discord: / discord
🔔 Newsletter: newsletter.webdevcody.com/
📁 GitHub: github.com/webdevcody
📺 Twitch: / webdevcody
🤖 Website: webdevcody.com
🐦 Twitter: / webdevcody
Q: When did you become expert in go?
A: Last night
I KNOW KUNG FU
I understood that reference.
@@WebDevCody thought that was from iron man
thanks for doing alot of content on devops stuff and cloud stuff, super important and helpful to learn.
Good job babe!
😘
Enjoyed my tea watching this. Glad you're feeling better big guy.
Been waiting for this kind of topic in your channel!
If you want to make your docker image even smaller, you can use a distroless rather than an alpine image to copy your go binary there. It's also more secure.
There is a local cluster u can use before throwing everything in prod
U can use something calls minikube or kind
thanks cody, easy 5 years of experience in k8s after watching this vids.
One good practice is to create a Makefile and put the "build container", "push container", and "apply changes" commands into it.
Great job learning all of this in such a small amount of time! You got some concepts mixed here and there but nothing that would stop you running your workloads. As you will get more exposed to k8s you will learn all those details and best practices just in time as you need them 😊
Keep creating this type of content sir ❤
you can configure your load balancer to use ip_hash that way the load balancer always send the user back to the server they hit originally
Loved this level of overview. Thanks for sharing.
Coming from Docker Compose this managed Kubernetes approach looks reasonable. I'd love to see a follow up if you configure a database or media storage with this.
for sure, I'll dive into that stuff soon I think
Great job.
Your control plane in theory should be an odd number 3 for high availability. In a production environment your workloads will not run on those control planes. They will run on worker nodes. The control plane will distribute between those deployments and pods across those nodes. If a node dies then it will spin up new.
It would be great to post more videos about docker and Kubernetes
plz make more videos of GOLANG
OK FINE
Funny, I also am taking course on GKE at the moment. As of my understanding, having more than 1 replica is not hard requirement for having no downtime during update. With maxSurge, we can define how many additional pods there can be during deployment, so the new pod can be created before the old pod is rolled out.
oh that's cool, thanks for the info!
Setting up a local cluster (2 nodes) was an absolute fucking pain. I started about a week ago (at the same time this video launched), and it took me 2 days just to get through the fundamentals and get a ingress-nginx controller up a running and another 2 days to set up cert-manager enable ssl for my deployments. That being said, things are starting to move a lot faster now. The first week is alwasy the most difficult and the slowest.
16:30 you could have added a reddis instance to the cluster and then hit it with go, this way you can have multiple go instances running at the same time, but it falls apart at this point because you would no longer have to scale the go instances horizontally as they're not the critical point anymore ig
More!!! I'm learning too!
Very well explained
Last week you mastered Go, now Kubernetes. This is exciting, next week you'll rebuild Google search engine? Love the videos as always.
I'm building an operating system tomorrow
@@WebDevCodydon't forget to post here
A master! thanks.
Great stuff on learning Kubernetes! Just want to elaborate that currently, your application is "stateful". Meaning that your application will have a state (the keys that are being stored in memory). This is the reason that replicating to two or more pods will result in different responses (since the containers will not know each others state).
Generally, you want your applications inside Kubernetes to be "stateless". Stateless applications are easy to scale up and down since you do not have to worry about losing data inside the container. Replicating stateful applications is possible but require a bit more setup (writing the state to an external resource, using PersistentVolumes, Operators etc.)
yeah I wanted to think about how to keep the nodes in sync in regards to data. I was going to use a message broker to broadcast writes to all nodes in the system to keep their state uniform, and also look into a volume to periodically write the state to disk in the event that a new node comes online or one crashes. Obviously there are solutions that already do this, but I wanted to try and buliding my own key-value system myself just to learn a bit.
@@WebDevCody for these cases, redis shines. Pretty fast, can be hosted inside your cluster or outside.
Have you tried minikube? It can be a good starting point if you want to set up a single node Kubernetes cluster on your local machine. This might save you some money :)
not yet, I kind of wanted to test on prod to learn 🤣
you would need an ingress controller, cert manager and ingress resources to handle exposing services with https
I’ll probably explore that next
great video but I've found that I can scale a single node super far and reach for k8s later when (and if) I need it
can you make one on nomad deployment?.
Just a tip for future projects. You should generally avoid stateful servers and instead use a designated db for your state. This will make your scaling as easy as increasing the Replica count
Which vs code theme is that??
bearded theme stained blue
Thanks for a great video! One thing that I didn't get is if we have 2 pods ( so one replica ) and we have 1 node, how are we having 2 pods listening on :8080? 🤔
Kubernetes takes care of that using its internal networking. 🤷♂️ im not the master you should be asking, and openai is down right now or else id use it to sound smart in my response
@WebDevCody hahaha I'm also learning, but as far as I read it is because of docker container, we can export the same port but then when we run the container we can bind to a different host port and load balancer will switch between lets say :81 and :82, nice to know 😁
@WebDevCody but yes k8s handles this 😊
Nope, actually they just get the custom ip for each pod, nice 😂
@@oryankibandi3556 yeah, but the question was how are they routing it, and the answer is by giving each pod a separate ip address, so ports can be the same and no port mapping needed :)
hey, you said you mastered go can i ask what did you do and some sources you recc
It was a joke
@@WebDevCody lol aintnoway anyway what you did
Cody, if you hit any obstacles or want anything explaining within K8S, then please reach out.
I have got great value from your videos over the last 18months, and would be happy to return the favour with a technology that I am certified on.
Sure thing, but reach out where? Join my discord
@@WebDevCody ok, i'll join it.
Masternetes
Title "I'm a master at kunernetes".
Video literary at 40sec "I'm not a master at kubernetes"
I make videos for my subs, so they know it's a joke to begin with
I am master at Kubernetes....proceeds to use a managed solution 😂
I'm a master, not a grand master. get it right.
Eksctl is better than kubeadm at least for aws. But it's still like a mess
I don't like the contrast between the dark and white background in this video
Sorry
you know k8s is not for indie dev when you need to do a drawing to explain how to deploy a single binary file
Clickbait title. No one master kubernetes lol. But seriously good job!
first
18$ is not cheap lol ,
and amazing content as always, keep going