Compute Services

IBM Cloud Kubernetes Service Deployment Patterns #3: Multi-Zone Cluster, LoadBalancer with In-Zone Backends Only

Share this post:

Deployment Patterns #3: Multi-Zone Cluster, App exposed via LoadBalancer Using In-Zone Backends Only

In my previous post, “IBM Cloud Kubernetes Service: Deployment Patterns for Maximizing Throughput and Availability,” I briefly described a few cluster deployment patterns that should be considered when you are looking to deploy IBM Cloud Kubernetes Service clusters. When choosing the right pattern, you must consider the requirements of the application you are running (including scale), the SLA target, and the budget.

Example deployment pattern

Let’s go through the steps to deploy an example application with the following deployment pattern below:

Steps

  1. Sign up and create a multi-zone IKS cluster using the IBM Cloud Console. Consult the documentation on deploying a cluster and specifically how multi-zone clusters work. Important: You have to use the paid tier.
  2. Download and apply the the following example Deployment and Service resource yaml, which will expose the echoserver application via the LoadBalancer service on port 1884 in three availability zones you specify in the yaml.
    $ kubectl apply -f iks_multi-zone_cluster_app_via_LoadBalancer_using_local_endpoints_only.yaml
    Note: Do not forget to edit the lines marked with NEED TO EDIT!
  3. Check the IP address of the LoadBalancer service:

Test the app

  1. To test, load the IP:port you specified in your browser or initiate curlcommands (like my example):
    $ curl http://{your IP here}:1884/
  2. You should see a response like this (run it for each LoadBalancerIP address):

You can see the source IP address in the client_address field because we applied the externalTrafficPolicy: Local in the LoadBalancer Service resource.

Chief Architect, Networking – IBM Cloud Kubernetes Service

More Compute Services stories
May 2, 2019

Video – What is a DDoS Attack?

Ryan Sumner, Chief Networking Architect, gives an overview of DDoS attacks and just how the attacker's botnet can affect the target application and its users.

Continue reading

April 25, 2019

What is Object Storage?

In our latest lightboarding video, Anirup Dutta explains how object storage works, lists some of the benefits, and give you some use cases for when object storage may be your best option.

Continue reading

March 28, 2019

VIDEO – Virtualization in 2019

In this video, we’re going to be looking at virtualization from the 10,000-foot view. Even though it is a decades-old technology, it's still vital to understand the basic components of virtualization as it is a core pillar of cloud computing methodology in 2019.

Continue reading