Hello everyone, welcome to Stratoscale Hybrid DevOps Pros, I'm Ariel and I'm here with Liaz. Hi Ariel. Hi Liaz
So today we're going to see how we scale a Kubernetes cluster
okay, so we've deployed a Kubernetes cluster inside of a VPC using Terraform and then again using
Terraform we set up a load balancer and we deployed an application into that Kubernetes cluster
Now, let's see how we can scale that cluster. So I have
all kinds of stories from my customers on how much it's
an "easy" (quotes) to scale a Kubernetes cluster so if they're working on
physical
Environment then they need to ask their IT guy get me another machine that might take days, weeks, virtual machines again
let's see how easy it is to extend on a unified solution such as
Symphony. So managed Kubernetes services on symphony 4.2.6
Make your life easier, right? They take away all the undifferentiated heavy lifting
making it easy to use Kubernetes and
Don't need to bother with deploying it. No. Just think of the business value need to supply so single finger
Extend. Now, we on 2 let's go to 3. All right
We're done, let's get coffee
So what a symphony do behind the scenes when you try to extend the Kubernetes cluster? So it's a
Said it's a managed solution. So it's not that easy behind the scenes. So engineers worked pretty hard
We are creating a virtual machine. It's gonna spawn give me a second - here it is
it is already spawned. So we have another instance that joined the cluster
Yes, so it will join the cluster and then it will be provisioned to be a Kubernetes cluster
It will show up here in
the Kubernetes
Dashboard, by the way, let's see how is it is to open it... So we're going to
allocate an instance. We're gonna provision an instance
We're going to deploy Kubernetes worker node into it and then it's going to join the Kubernetes cluster
Yes, that specific Kubernetes cluster
so again
If you're a bunch of people in the team in each and every one of you has a Kubernetes cluster
You don't have to worry where does my virtual machine will go - to that specific cluster and appear in your cluster. Yeah
Got it.
So if I look at the nodes right now
You still have 2 nodes, and if you look at the Symphony UI we're going to see it's still being
provisioned. So it's provisioned if I go to "Events" you see that it done?
Okay, we've allocated an instance and now we're deploying Kubernetes into it. Yes
Once it's done it's going to
join the cluster. We're sitting in a VPC environment
And let's take a look at our VPC... Yes, so the VPC you can see that I have now three virtual machines
I see. And one load balancer. I see - 3 instances and a load balancer.
Yeah
The application is up and running. So we're just extending it, we're scaling it
The users of your application don't know anything that's going on right now behind the scenes. Okay, so it's not impacting the Kubernetes cluster yet
So again if we refresh
Still 2 nodes, still configuring
But I don't have to go to the Kubernetes UI because everything is reflected from Kubernetes
into symphony UI as a single pane of glass
So it's still provisioning then it will go to a "Degraded State", degrated mean I still did not do all the health checks
I need to do in order to make sure we are a healthy 3 node cluster
And once this is done, we'll be able to scale it in your application. Fantastic
Let's give it a couple minutes and see what happens
Oh! there you go! so it went from 2 degraded
Okay, so our cluster just grew and now it's going through health checks before it becomes available inside the Kubernetes. Yes
It is degraded, just to make sure you don't use the third cluster right now because
they're still doing some health checks, once it is running, then we'll scale the application
Ok, so we have 3 active nodes, Yeah - 3 active nodes, Kubernetes By the way
Already will already declare that
It has a third node. Ah, wonderful. Yes
So Kubernetes thinks it already has the third node
But we want to have some extra health checks... And here we see it 23 minutes, 20 minutes and 36 seconds ago. Yep. It launched a certain instance.
Okay, it's integrated and soon to be running. That's great
Oh! here we go. The cluster is now healthy
What do we do now that the cluster is bigger? Okay, so
Let's use it. So now we have an extra node in the cluster. Let's replicate our
Application to use the third node. Yes! So again... let's grow the application. Yes. So again, we'll do... we just scale the replicas to
three
Scale... let's ask what is the rollout status? Oh! now we are going 2 out of 3 in the process of scaling and
Soon it's going to be added to the application
But we still have one thing to go to - let's see the rollout status
Done.
But I still can't use that node. Oh, why not? Because I need to connect it to my load balancer. I see. Right, so
Again, super easy. We're in a unified solution. Okay, so my nodes are in my VPC
So now I can go to my ELB. Yes
And just modify the target group. Target group is how load balancer
connects into the instances. Okay, so I just gonna to modify it
Nothing to modify here. Just gonna say, okay, please add one more group
instance
number two
And finish. Okay. Done
One last comment - I've done this through the UI, but there's no reason why not to do it using our
APIs, CLIs clients, I've just done it through UI for the sake of it
Fantastic. Okay, so now I can go back to
to make Kubernetes and
Again go to
Let's look at the app. Yes. So the app is... Oh
supposed to be here. Oh, I'm sorry. It's not in the Kubernetes it's in the Load Balancer
So I'll take that 143 which is actually where the application is exposed
And there it is! So now I see one host name - two host names
And if you refresh you're gonna hit a different host, depand on the load balancing. Perfect
By the way, we do have sticky sessions. But if I would use sticky sessions you won't see the host names...
I'll always see the same server. Got it
Wonderful, so we just killed the Kubernetes cluster. Mhm
Very easy. Very easy - you scaled the Kubernetes cluster you
Automatically I've done it to the UI but it's very easy to also put it into a load balancer
Very easy to scale down the cluster. Fantastic
All you need to focus is on your application. That's great. That's how you scale a Kubernetes cluster with Symphony 4.2.6.
Thanks. Thank you
Không có nhận xét nào:
Đăng nhận xét