{"id":87,"date":"2023-11-28T14:03:43","date_gmt":"2023-11-28T19:03:43","guid":{"rendered":"https:\/\/chrisj.cloud\/?p=87"},"modified":"2023-11-28T14:03:43","modified_gmt":"2023-11-28T19:03:43","slug":"stretching-kubernetes-architecture-across-distributed-private-cloud","status":"publish","type":"post","link":"https:\/\/chrisj.cloud\/index.php\/2023\/11\/28\/stretching-kubernetes-architecture-across-distributed-private-cloud\/","title":{"rendered":"Stretching Kubernetes Architecture across Distributed Private Cloud"},"content":{"rendered":"\n<p>As a Solutions Architect and after all the years helping my clients select the right architectures for their use cases or requirements I have come up with a certain realization. My primary job is to identify and present a list of trade-offs for anything that I build (for my clients) and make sure I help them select the best option.&nbsp; If you have heard the expression &#8211; \u201dYou can&#8217;t have your cake and eat it (too)\u201d, this blog is going to put you in a similar dilemma. I\u2019ll describe four distributed Kubernetes (OpenShift) Architectures and their trade-offs to help you decide which one is right for you. Spoiler alert, there is no single option that is better than the rest.<\/p>\n\n\n\n<p>Let\u2019s start with some assumptions.<\/p>\n\n\n\n<ol>\n<li>My private cloud of choice is OpenStack. Not all of the considerations will translate to other datacenter technologies or public clouds<\/li>\n\n\n\n<li>Distribution of the resources has its limitations. As a matter of fact etcd that is used by Kubernetes has a single digit to low double digit latency requirement. Other words, in order for us to consider stretching Kubernetes across availability zones, we need to ensure those are not too far apart geographically.<\/li>\n\n\n\n<li>Some of the characteristics might not be available in the upstream versions of the components used in this analysis and at least have not been tested nor verified.<\/li>\n<\/ol>\n\n\n\n<p>Here is the overall architecture:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"978\" src=\"https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/BMaaS-Large-Cloud-Reference-Architecture-Distributed-arch-website-1024x978.png\" alt=\"\" class=\"wp-image-89\" srcset=\"https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/BMaaS-Large-Cloud-Reference-Architecture-Distributed-arch-website-1024x978.png 1024w, https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/BMaaS-Large-Cloud-Reference-Architecture-Distributed-arch-website-300x287.png 300w, https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/BMaaS-Large-Cloud-Reference-Architecture-Distributed-arch-website-768x733.png 768w, https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/BMaaS-Large-Cloud-Reference-Architecture-Distributed-arch-website.png 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Characteristics:<\/p>\n\n\n\n<ul>\n<li>Multiple availability Zones&nbsp;<\/li>\n\n\n\n<li>Same geographical location<\/li>\n\n\n\n<li>L2 stretched Openstack control plane (for now)<\/li>\n\n\n\n<li>Kubernetes cluster per AZ or stretched across AZs<\/li>\n\n\n\n<li>Routed Networking between AZs<\/li>\n\n\n\n<li>Availability of all services across 3 AZs (any one AZ can be killed at any time without disruption of the services)<\/li>\n<\/ul>\n\n\n\n<p>Now, let me show you four viable openshift deployment architectures that can stretch over multiple availability zones (to enhance SLAs). Especially the first 2 are my strong recommendation to consider, since they use most automation for its lifecycle.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Architecture #1 &nbsp;&#8211; IPI &#8211; RPN with small stretched L2 for OCP control<\/strong><\/p>\n\n\n\n<p>Implementation:<\/p>\n\n\n\n<p><strong>Day 1:<\/strong><br>Install minimal OpenShift (Kubernetes) using automation (IPI) over stretched L2 Provider network (1 master and 1 worker per AZ).<\/p>\n\n\n\n<p><strong>Day2:<\/strong><br>Create Dedicated MachineSets per AZ for new workers. Scale-out as needed<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Pros:<\/strong><\/p>\n\n\n\n<ul>\n<li>Full use of Openshift (Kubernetes) installer automation<\/li>\n\n\n\n<li>Worker nodes use Routed Provided Networks (RPN) for workload high performance &amp; availability<\/li>\n\n\n\n<li>Stretched network can be done one-per-cluster or combined as desired<\/li>\n<\/ul>\n\n\n\n<p><strong>Cons:<\/strong><\/p>\n\n\n\n<ul>\n<li>Uses Administrator managed VLAN based networks (operational overhead)<\/li>\n\n\n\n<li>Openshift control plane availability dependant on high availability of the stretched network\u2019s gateways<\/li>\n\n\n\n<li>Openshift Master\/Infra nodes do not use RPNs<\/li>\n\n\n\n<li>For multiple clusters a potential need for additional stretched L2 due to VRRP collision<br>&nbsp;<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"769\" height=\"1024\" src=\"https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/IPI-across-multiple-subnets-IPI-stretched-provider-website-769x1024.png\" alt=\"\" class=\"wp-image-90\" srcset=\"https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/IPI-across-multiple-subnets-IPI-stretched-provider-website-769x1024.png 769w, https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/IPI-across-multiple-subnets-IPI-stretched-provider-website-225x300.png 225w, https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/IPI-across-multiple-subnets-IPI-stretched-provider-website-768x1023.png 768w, https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/IPI-across-multiple-subnets-IPI-stretched-provider-website.png 901w\" sizes=\"(max-width: 769px) 100vw, 769px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Architecture #2 &nbsp;&#8211; IPI &#8211; Overlay network with no-DVR on FIPs<\/strong><\/p>\n\n\n\n<p>Implementation:<\/p>\n\n\n\n<p><strong>Day 1:<\/strong><br>Install fully blown OpenShift (Kubernetes) using automation (IPI) over an overlay tenant network. The ingress and API handles by a floating IP with disabled DVR<\/p>\n\n\n\n<p><strong>Day2:<\/strong><br>No action required. Scale-out as needed<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Pros:<\/strong><\/p>\n\n\n\n<ul>\n<li>Simplest architecture<\/li>\n\n\n\n<li>Only 3 Routable IPs required (min) per Openshift cluster<\/li>\n\n\n\n<li>optional day 2 operation to scale out per AZ workers<\/li>\n\n\n\n<li>No admin work required with every new cluster (no operational overhead)<\/li>\n<\/ul>\n\n\n\n<p><strong>Cons:<\/strong><\/p>\n\n\n\n<ul>\n<li>SNAT for workers without a Floating IP<\/li>\n\n\n\n<li>No external access to most workers<\/li>\n\n\n\n<li>Performance can be affected by double encapsulation&nbsp;<br>&nbsp;<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"778\" height=\"1024\" src=\"https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/IPI-across-multiple-subnets-IPI-Overlay-net-website-778x1024.png\" alt=\"\" class=\"wp-image-91\" srcset=\"https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/IPI-across-multiple-subnets-IPI-Overlay-net-website-778x1024.png 778w, https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/IPI-across-multiple-subnets-IPI-Overlay-net-website-228x300.png 228w, https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/IPI-across-multiple-subnets-IPI-Overlay-net-website-768x1011.png 768w, https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/IPI-across-multiple-subnets-IPI-Overlay-net-website.png 912w\" sizes=\"(max-width: 778px) 100vw, 778px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Architecture #3 &nbsp;&#8211; UPI &#8211; RPN with external load balancer for control plane<\/strong><\/p>\n\n\n\n<p>Implementation:<\/p>\n\n\n\n<p><strong>Day 1:<\/strong><br>Install fully blown OpenShift (Kubernetes) using manual configuration (UPI) over Routed Provider Networks with 3rd party load balancer<\/p>\n\n\n\n<p><strong>Day2:<\/strong><br>Scaling out can require additional manual configuration<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Pros:<\/strong><\/p>\n\n\n\n<ul>\n<li>No stretched L2 Provider network required<\/li>\n\n\n\n<li>OCP Master\/Infra &amp; Worker nodes use RPNs for workload performance &amp; availability<\/li>\n\n\n\n<li>Easy integration with some enterprise load balancers (example &#8211; F5 operator available if desired)<\/li>\n<\/ul>\n\n\n\n<p><strong>Cons:<\/strong><\/p>\n\n\n\n<ul>\n<li>Significant lifecycle overhead<\/li>\n\n\n\n<li>Inability to create new clusters with automation<\/li>\n\n\n\n<li>3rd party needs to handle infrastructure load balancing<\/li>\n\n\n\n<li>Load balancing configuration is manual (unless automation is created)<br>&nbsp;<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"936\" height=\"1024\" src=\"https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/IPI-across-multiple-subnets-UPI-RPN-website-936x1024.png\" alt=\"\" class=\"wp-image-92\" srcset=\"https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/IPI-across-multiple-subnets-UPI-RPN-website-936x1024.png 936w, https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/IPI-across-multiple-subnets-UPI-RPN-website-274x300.png 274w, https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/IPI-across-multiple-subnets-UPI-RPN-website-768x840.png 768w, https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/IPI-across-multiple-subnets-UPI-RPN-website.png 1097w\" sizes=\"(max-width: 936px) 100vw, 936px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Architecture #4 &nbsp;&#8211; Overlay with 3rd party HAProxy controllers<\/strong><\/p>\n\n\n\n<p>Implementation:<\/p>\n\n\n\n<p><strong>Day 1:<\/strong><br>Openshift installation is partially automated (IPI) with a load balancing component deployed manually and attached to appropriate overlay and provider networks<\/p>\n\n\n\n<p><strong>Day2:<\/strong><br>After the most laborious Day1+, the scale-out should have the least friction, but operational overhead of HAProxy VMs is there.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Pros:<\/strong><\/p>\n\n\n\n<ul>\n<li>No stretched L2 Provider network Requirement<\/li>\n\n\n\n<li>DVR available for high availability and performance<\/li>\n<\/ul>\n\n\n\n<p><strong>Cons:<\/strong><\/p>\n\n\n\n<ul>\n<li>Significant lifecycle overhead<\/li>\n\n\n\n<li>3rd party integration (HAProxy), outside of vendor support<\/li>\n\n\n\n<li>Worker nodes use SNAT<\/li>\n\n\n\n<li>No external access to OCP nodes<\/li>\n\n\n\n<li>Would require testing<br>&nbsp;<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"928\" height=\"1024\" src=\"https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/IPI-across-multiple-subnets-IPI-Overlay-HAProxy-website-928x1024.png\" alt=\"\" class=\"wp-image-93\" srcset=\"https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/IPI-across-multiple-subnets-IPI-Overlay-HAProxy-website-928x1024.png 928w, https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/IPI-across-multiple-subnets-IPI-Overlay-HAProxy-website-272x300.png 272w, https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/IPI-across-multiple-subnets-IPI-Overlay-HAProxy-website-768x848.png 768w, https:\/\/chrisj.cloud\/wp-content\/uploads\/2023\/11\/IPI-across-multiple-subnets-IPI-Overlay-HAProxy-website.png 1087w\" sizes=\"(max-width: 928px) 100vw, 928px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>In summary these are 4 viable architectures that could be used for stretching Kubernetes across multiple availability zones in distributed architecture.<br>You have been warned, there is no one architecture to rule them all. The most tradeoffs are around operational overhead, performance and availability, but today you can\u2019t have it all.<\/p>\n\n\n\n<p>There is however light in a tunnel. The future architectures might be able to take advantage of BGP to automatically distribute OpenShift nodes over RPNs in multiple AZs Day1, without a need of external load balancer. In such architecture the operational overhead could be reduced without sacrificing performance or availability. I\u2019ll leave this topic for another time (when the feature is actually implemented) and another blog post.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As a Solutions Architect and after all the years helping my clients select the right architectures for their use cases or requirements I have come up with a certain realization. My primary job is t","protected":false},"author":1,"featured_media":88,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/chrisj.cloud\/index.php\/wp-json\/wp\/v2\/posts\/87"}],"collection":[{"href":"https:\/\/chrisj.cloud\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chrisj.cloud\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chrisj.cloud\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chrisj.cloud\/index.php\/wp-json\/wp\/v2\/comments?post=87"}],"version-history":[{"count":1,"href":"https:\/\/chrisj.cloud\/index.php\/wp-json\/wp\/v2\/posts\/87\/revisions"}],"predecessor-version":[{"id":94,"href":"https:\/\/chrisj.cloud\/index.php\/wp-json\/wp\/v2\/posts\/87\/revisions\/94"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/chrisj.cloud\/index.php\/wp-json\/wp\/v2\/media\/88"}],"wp:attachment":[{"href":"https:\/\/chrisj.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=87"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chrisj.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=87"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chrisj.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=87"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}