What is Azure Kubernetes Service(AKS) and Why Do You Need it?

Thanks to Collabnix community member Mewantha Bandar  , a Senior Software Engineer at IFS for contributing this content for KubeLabs – The #1 Kubernetes Resources for all Levels. Do you have anything exciting to share with Collabnix community? Do visit Collabnix community Slack and we might feature you in Collabnix website.

If you’re a great fan of Minikube and have been using it to host your Kubernetes clusters, it is important to understand that it might be a great tool for development and testing but however, when it comes to production, you need a Cloud-based, scalable, and highly available solution. Implementing this out of scratch on our own server would be very challenging, and make little sense, which is why all major cloud providers have an implementation that allows you to run your Kubernetes cluster on the cloud. AKS helps achieve this to some degree.

What is AKS?

To start understanding exactly what AKS is, let’s backtrack to the beginning. If you’ve forgotten the Kubernetes architecture, perhaps this is a good time to revisit this article.

Consider the following architecture, which is how Kubernetes works:

Kubernetes Architecture

You have the master node which handles and provisions worker nodes, which do the actual work of holding pods. Previously, when we used minikube, we ran everything on our local machine. However, now, we can move part of this to AKS. One thing to note is that AKS does not act as an alternative to the entire Kubernetes architecture, rather, it only replaces the master node. As such, AKS is free and only requires a normal Azure subscription. The processes which take place within the master node would be invisible to you, and you should not really care as to what goes on in the background. Instead, you only have to think about the service it provides, and how your worker nodes would use that service. In short, AKS abstracts away anything specific to the master node, and provides a host of other features as well. It does this by hosting everything on Azure, and providing it as a service.

Why use AKS?

You can reap the full benefits of AKS if the rest of your application, or your organization uses Azure cloud as their main cloud platform. The master node, which is handled by AKS allow you to upgrade your cluster with minimal hassle, allows seamless integration with other Azure services. Azure policies that you may have defined can be applied across clusters, and AKS handles provisioning and scaling with autoscaler integrations which takes all the manual work away from your. If you use Azure Container Instances (ACI), then you can schedule your containers in conjuction with AKS.

A major part of AKS is it’s ability to network, so we’ll be taking a look at that further.

AKS Networking

When deploying a cluster, there are two networking models to consider:

  • Kubenetes networking
  • Azure Container Networking Interface (CNI) networking

Kubenetes Networking

This model works off the Kubenet Kubernetes plugin, and is the default configuration for AKS. Since you would want to integrate your cluster with services across Azure, you would rely on your Azure Virtual Network (VNet). Your VNet is essentially your private network within Azure, and allows unrestricted communication between you Azure resoureces. It also allows communication with external resources, as well as the internet, and this is what Kubenet will be using as well. Both your nodes and your pods will get IP addresses from VNet, grouped by two different address spaces. That is to say, pods don’t get real IP’s. Since they reside in different address spaces, they have to use IP forwarding and Azure routing services. If you are not sure about these concepts, feel free to take a look at how traffic gets routed around Azue VNets from the official docs. Any resources that need to be addressed that are outside the Azure VNet get accessed by NAT (Network Address Translation). Once again, if this concept is unfamiliar to you, the official docs are you best friend.

Advantages

Why would you want to use Kubernetes networking? There are a couple of reasons:

  • Not too much pre-planning required
  • Little setup time (default option)
  • Only node get real IP addresses, not Pods, which means you don’t need as many allocatable IP addresses.

Disadvantages

There are several disadvantages of Kubernetes network, which can make organisations consider Azure CNI instead. They are:

  • User defined routes can be hard to manage as your cluster gets bigger
  • Since pods don’t have IP addresses, there is addional latency when communicating among nodes
  • You can only have one AKS cluster per subnet

Azure Container Networking Interface (CNI) networking

Unlike Kubenet, where the pods didn’t get real IPs, using CNI’s assigns real routable IP addresses to pods. This is a slightly more advanced form of networking and will require some planning ahead. This method allows the pod to be accessed directly using the IP addresses they get from the subnet. The number of IP addresses needed is set aside for the node. Since this is a hard limit, this is where planning is needed to prevent exhausting IP addresses. Both pods and nodes get IPs from the same subnet and therefore support up to 250 pods per node.

So how would a pod communicate between resources? If the resource is within the same VNet, the target resource will see the pod’s IP directly, while if the resource is outside the VNet, then the target resource sees the node IP. Not the pod IP.

Advantages

There are a couple of advantages to using CNI, which contrasts with Kubenet:

Disadvantages

  • Proper planning needed to prevent IP address exhaustion
  • Setup is more complex

In our next blog post, you will see how to manage roles in AKS. Stay tuned!


References:

 

Please follow and like us:
1

151 thoughts on “What is Azure Kubernetes Service(AKS) and Why Do You Need it?

  1. Great ?V I should certainly pronounce, impressed with your web site. I had no trouble navigating through all the tabs and related info ended up being truly easy to do to access. I recently found what I hoped for before you know it in the least. Reasonably unusual. Is likely to appreciate it for those who add forums or anything, web site theme . a tones way for your customer to communicate. Excellent task..

  2. Excellent goods from you, man. I’ve understand your stuff previous to and you’re just too wonderful. I really like what you’ve acquired here, really like what you are stating and the way in which you say it. You make it entertaining and you still care for to keep it wise. I can’t wait to read far more from you. This is really a terrific site.

  3. hello!,I really like your writing so much! percentage we keep up a correspondence more approximately your post on AOL? I need a specialist on this house to unravel my problem. Maybe that’s you! Taking a look ahead to peer you.

  4. Hmm it appears like your website ate my first comment (it was extremely long) so I guess I’ll just sum it up what I had written and say, I’m thoroughly enjoying your blog. I as well am an aspiring blog blogger but I’m still new to everything. Do you have any tips for newbie blog writers? I’d definitely appreciate it.

  5. Thank you for the sensible critique. Me and my neighbor were just preparing to do a little research about this. We got a grab a book from our area library but I think I learned more clear from this post. I am very glad to see such wonderful info being shared freely out there.

  6. I wanted to compose you this little remark in order to thank you so much yet again for these pleasing thoughts you’ve shared on this site. It is simply pretty generous of people like you to deliver freely precisely what most of us could have supplied as an e-book to end up making some cash on their own, precisely seeing that you could have done it if you decided. The pointers in addition served to become good way to be aware that the rest have similar interest just like my own to know good deal more related to this problem. I am certain there are thousands of more enjoyable periods up front for folks who find out your site.

  7. Once I initially commented I clicked the -Notify me when new feedback are added- checkbox and now every time a comment is added I get four emails with the same comment. Is there any method you may take away me from that service? Thanks!

  8. The root of your writing whilst sounding reasonable originally, did not settle properly with me personally after some time. Somewhere within the paragraphs you actually managed to make me a believer unfortunately just for a short while. I nevertheless have a problem with your leaps in logic and one would do well to help fill in those breaks. In the event that you can accomplish that, I would certainly end up being amazed.

  9. What i do not understood is actually how you’re not actually a lot more well-favored than you might be right now. You’re very intelligent. You realize thus significantly relating to this matter, made me in my opinion imagine it from so many numerous angles. Its like men and women aren’t fascinated except it is one thing to do with Girl gaga! Your own stuffs nice. At all times take care of it up!

  10. We absolutely love your blog and find the majority of your post’s to be just what I’m looking for. Would you offer guest writers to write content available for you? I wouldn’t mind creating a post or elaborating on some of the subjects you write about here. Again, awesome weblog!

  11. Have you ever thought about including a little bit more than just your articles? I mean, what you say is fundamental and everything. But think about if you added some great graphics or videos to give your posts more, “pop”! Your content is excellent but with pics and clips, this blog could undeniably be one of the very best in its niche. Superb blog!

  12. I do consider all the ideas you have presented in your post. They are really convincing and will certainly work. Nonetheless, the posts are very brief for newbies. Could you please lengthen them a little from next time? Thank you for the post.

  13. I like what you guys are up also. Such intelligent work and reporting! Carry on the excellent works guys I?ve incorporated you guys to my blogroll. I think it will improve the value of my website 🙂

  14. Having read this I thought it was very informative. I appreciate you taking the time and effort to put this article together. I once again find myself spending way to much time both reading and commenting. But so what, it was still worth it!

  15. Thank you for sharing excellent informations. Your site is so cool. I am impressed by the details that you have on this web site. It reveals how nicely you perceive this subject. Bookmarked this website page, will come back for more articles. You, my friend, ROCK! I found simply the information I already searched everywhere and just could not come across. What a great website.

  16. I’m impressed, I must say. Actually rarely do I encounter a blog that’s both educative and entertaining, and let me inform you, you have hit the nail on the head. Your thought is outstanding; the problem is something that not sufficient individuals are talking intelligently about. I am very joyful that I stumbled across this in my seek for one thing regarding this.

Leave a Reply to Anonymous Cancel reply