{"id":4403,"date":"2019-01-17T18:32:50","date_gmt":"2019-01-17T17:32:50","guid":{"rendered":"https:\/\/blog.mi.hdm-stuttgart.de\/?p=4403"},"modified":"2023-06-09T12:06:32","modified_gmt":"2023-06-09T10:06:32","slug":"radcup-part-2-cloud","status":"publish","type":"post","link":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2019\/01\/17\/radcup-part-2-cloud\/","title":{"rendered":"Radcup Part 2 &#8211; Transition into Cloud"},"content":{"rendered":"\n<p>Written by: Immanuel Haag, Christian M\u00fcller, Marc R\u00fcttler<\/p>\n\n\n\n<p>Several steps are necessary to transfer the Radcup backend to the cloud and make it accessible to everyone from the outside. These are explained in more detail in the following sections. <\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: External MongoDB<\/h2>\n\n\n\n<p>We have decided to use an external service from <a href=\"https:\/\/www.mongodb.com\/cloud\/atlas\">https:\/\/www.mongodb.com\/cloud\/atlas<\/a> for the MongoDB hosting. One of the reasons for this was that there is a cluster with a 3 node-replicaset based on AWS and can be used free of charge. This ensures easy to use high availability. It is also easier to start with an existing service, which you can replace later with your own service. MongoDB Cloud Atlas also offers advanced security features like IP-whitelisting. Metrics about the cluster can be easily viewed in the web interface. At this point it should be noted that you should always remember to enter the corresponding IP addresses in advance in the web interface, otherwise you will not be able to access the database. Below you can see some figures of our MongoDB Cluster administration page.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"4554\" data-permalink=\"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2019\/01\/17\/radcup-part-2-cloud\/screen-shot-2018-12-29-at-23-56-46\/\" data-orig-file=\"https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Screen-Shot-2018-12-29-at-23.56.46.png\" data-orig-size=\"642,1058\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screen Shot 2018-12-29 at 23.56.46\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Screen-Shot-2018-12-29-at-23.56.46-621x1024.png\" src=\"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Screen-Shot-2018-12-29-at-23.56.46.png?fit=621%2C1024&amp;ssl=1\" alt=\"\" class=\"wp-image-4554\" width=\"326\" height=\"537\" srcset=\"https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Screen-Shot-2018-12-29-at-23.56.46.png 642w, https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Screen-Shot-2018-12-29-at-23.56.46-182x300.png 182w, https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Screen-Shot-2018-12-29-at-23.56.46-621x1024.png 621w\" sizes=\"auto, (max-width: 326px) 100vw, 326px\" \/><figcaption>Overview MongoDB Cluster<\/figcaption><\/figure><\/div>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"2552\" height=\"1610\" data-attachment-id=\"4553\" data-permalink=\"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2019\/01\/17\/radcup-part-2-cloud\/screen-shot-2018-12-29-at-23-58-05\/\" data-orig-file=\"https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Screen-Shot-2018-12-29-at-23.58.05.png\" data-orig-size=\"2552,1610\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screen Shot 2018-12-29 at 23.58.05\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Screen-Shot-2018-12-29-at-23.58.05-1024x646.png\" src=\"https:\/\/i2.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Screen-Shot-2018-12-29-at-23.58.05.png?fit=656%2C414&amp;ssl=1\" alt=\"\" class=\"wp-image-4553\" srcset=\"https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Screen-Shot-2018-12-29-at-23.58.05.png 2552w, https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Screen-Shot-2018-12-29-at-23.58.05-300x189.png 300w, https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Screen-Shot-2018-12-29-at-23.58.05-768x485.png 768w, https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Screen-Shot-2018-12-29-at-23.58.05-1024x646.png 1024w\" sizes=\"auto, (max-width: 2552px) 100vw, 2552px\" \/><figcaption>Metrics from RadcupCloudDB <\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"2558\" height=\"704\" data-attachment-id=\"4555\" data-permalink=\"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2019\/01\/17\/radcup-part-2-cloud\/screen-shot-2018-12-30-at-00-06-53\/\" data-orig-file=\"https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Screen-Shot-2018-12-30-at-00.06.53.png\" data-orig-size=\"2558,704\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screen Shot 2018-12-30 at 00.06.53\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Screen-Shot-2018-12-30-at-00.06.53-1024x282.png\" src=\"https:\/\/i2.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Screen-Shot-2018-12-30-at-00.06.53.png?fit=656%2C181&amp;ssl=1\" alt=\"\" class=\"wp-image-4555\" srcset=\"https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Screen-Shot-2018-12-30-at-00.06.53.png 2558w, https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Screen-Shot-2018-12-30-at-00.06.53-300x83.png 300w, https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Screen-Shot-2018-12-30-at-00.06.53-768x211.png 768w, https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Screen-Shot-2018-12-30-at-00.06.53-1024x282.png 1024w\" sizes=\"auto, (max-width: 2558px) 100vw, 2558px\" \/><figcaption>IP-Whitelisting<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: IBM Cloud <\/h2>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><h3>Container Registry<\/h3>\n<p>A container registry serves as a central repository for docker images to make them accessible from anywhere. It also checks for security vulnerabilities and performs versioning.\nSince our goal is to deploy the backend image in a cluster, we have to store it in an appropriate registry. Our choice was the <a href=\"https:\/\/www.ibm.com\/cloud\/container-registry\">IBMCloud Container Registry<\/a>.<\/p>\n<p>In order to use the Container Registry of the IBMCloud, several requirements have to be fulfilled:<\/p>\n<ol>\n<li>The <a href=\"https:\/\/console.bluemix.net\/docs\/cli\/index.html#overview\"><code class=\"\" data-line=\"\">IBMCloud CLI<\/code><\/a> has been installed.<\/li>\n<li>The <a href=\"https:\/\/docs.docker.com\/engine\/installation\/\"><code class=\"\" data-line=\"\">Docker CLI<\/code><\/a> has been installed.<\/li>\n<li>The IBMCloud Container-Registry Plug-In was installed via the command line through <code class=\"\" data-line=\"\">ibmcloud plugin install container-registry -r Bluemix<\/code>.<\/li>\n<\/ol>\n<p>Once the tools have been installed or the prerequisites have been met, the setup of the container registry can be started. The following steps are necessary for this:<\/p>\n<ul>\n<li>Log in to your IBMCloud account:<\/li>\n<\/ul>\n<\/div>\n\n\n\n<pre class=\"hljs\" style=\"display: block; overflow-x: auto; padding: 0.5em; background-color: rgb(68, 68, 68); color: rgb(221, 221, 221);\">ibmcloud login <span class=\"hljs-_\">-a<\/span> https:\/\/api.eu-de.bluemix.net<\/pre>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><ul>\n<li>Choose a name for the namespace, and create that namespace:<\/li>\n<\/ul>\n<\/div>\n\n\n\n<pre class=\"hljs\" style=\"display: block; overflow-x: auto; padding: 0.5em; background-color: rgb(68, 68, 68); color: rgb(221, 221, 221);\">ibmcloud cr namespace-add &lt;my_namespace&gt;\n\n<span class=\"hljs-comment\" style=\"color: rgb(119, 119, 119);\">#e.g. &lt;my_namespace&gt; will be replaced by 'system_engineering_radcup'<\/span><\/pre>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><p>Overview of the existing namespaces:\n<\/p>\n<figure><img decoding=\"async\" src=\"https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Bildschirmfoto-2018-12-27-um-00.48.31-1.png\" alt=\"Alt\" title=\"Namespace Overview\"><\/figure>\n<p>After the namespace has been created, images can be pushed into it:<\/p>\n<ul>\n<li>Log your local Docker daemon into the IBM Cloud Container Registry:<\/li>\n<\/ul>\n<\/div>\n\n\n\n<pre class=\"hljs\" style=\"display: block; overflow-x: auto; padding: 0.5em; background-color: rgb(68, 68, 68); color: rgb(221, 221, 221);\">ibmcloud cr login<\/pre>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><ul>\n<li>Choose a repository and tag by which you can identify the image:<\/li>\n<\/ul>\n<\/div>\n\n\n\n<pre class=\"hljs\" style=\"display: block; overflow-x: auto; padding: 0.5em; background-color: rgb(68, 68, 68); color: rgb(221, 221, 221);\">docker tag &lt;image_name&gt; registry.eu-de.bluemix.net\/&lt;my_namespace&gt;\/&lt;my_repository&gt;:&lt;my_tag&gt;\n\n<span class=\"hljs-comment\" style=\"color: rgb(119, 119, 119);\"># e.g. &lt;image_name&gt; -&gt; radcup_backend, &lt;my_namespace&gt; -&gt; system_engineering_radcup, <\/span>\n<span class=\"hljs-comment\" style=\"color: rgb(119, 119, 119);\"># &lt;my_repository&gt; -&gt; radcup_backend and &lt;my_tag&gt; -&gt; 1<\/span><\/pre>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><ul>\n<li>Push the image:<\/li>\n<\/ul>\n<\/div>\n\n\n\n<pre class=\"hljs\" style=\"display: block; overflow-x: auto; padding: 0.5em; background-color: rgb(68, 68, 68); color: rgb(221, 221, 221);\">docker push registry.eu-de.bluemix.net\/&lt;my_namespace&gt;\/&lt;my_repository&gt;:&lt;my_tag&gt;\n\n<span class=\"hljs-comment\" style=\"color: rgb(119, 119, 119);\"># e.g. &lt;my_namespace&gt; -&gt; system_engineering_radcup, <\/span>\n<span class=\"hljs-comment\" style=\"color: rgb(119, 119, 119);\"># &lt;my_repository&gt; -&gt; radcup_backend and &lt;my_tag&gt; -&gt; 1<\/span><\/pre>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><ul>\n<li>Verify that your image is in your private registry:<\/li>\n<\/ul>\n<\/div>\n\n\n\n<pre class=\"hljs\" style=\"display: block; overflow-x: auto; padding: 0.5em; background-color: rgb(68, 68, 68); color: rgb(221, 221, 221);\">ibmcloud cr image-list\n\nREPOSITORY                                                                TAG                   DIGEST         NAMENSBEREICH               ERSTELLT       GR\u00d6SSE   Sicherheitsstatus   \nregistry.eu-de.bluemix.net\/system_engineering_radcup\/radcup_backend   1.1.1-build.xxxxxxx   330xxxxxcb61   system_engineering_radcup   4 days ago     288 MB   0 Probleme   <\/pre>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><h3>Container\/Kubernetes Service<\/h3>\n<\/div>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><p>Objective: Deploy the docker image stored in the Container Registry in a cluster and make it publicly available.<\/p>\n<p>In order to achieve this goal, we decided to use the IBMCloud Container Service. It is based on native <a href=\"https:\/\/kubernetes.io\/\">Kubernetes<\/a> and offers the user not only the possibility to deploy images, but also to track their status via a web interface.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"4679\" data-permalink=\"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2019\/01\/17\/radcup-part-2-cloud\/overview\/\" data-orig-file=\"https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/overview.png\" data-orig-size=\"1903,723\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"overview\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/overview-1024x389.png\" src=\"https:\/\/i2.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/overview.png?fit=656%2C249&amp;ssl=1\" alt=\"\" class=\"wp-image-4679\" width=\"661\" height=\"251\" srcset=\"https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/overview.png 1903w, https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/overview-300x114.png 300w, https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/overview-768x292.png 768w, https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/overview-1024x389.png 1024w\" sizes=\"auto, (max-width: 661px) 100vw, 661px\" \/><figcaption>Overview of current deployments<\/figcaption><\/figure><\/div>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><p>In order to deploy images, a cluster must first be created. There are two ways to do this:<\/p>\n<ul>\n<li>The IBMCloud web interface\n<ul>\n<li>In the catalog, select the IBM Cloud Kubernetes Service option<\/li>\n<li>Select a region where your cluster will be deployed<\/li>\n<li>Select the free cluster plan<\/li>\n<li>Give your cluster a name<\/li>\n<li>Click Set Up Cluster<\/li>\n<\/ul>\n<\/li>\n<li>The <a href=\"https:\/\/console.bluemix.net\/docs\/cli\/index.html#overview\">IBMCLoud CLI<\/a><\/li>\n<\/ul>\n<p>If the cluster is to be created by using the CLI, the following steps are necessary:<\/p>\n<ul>\n<li>Log in to your IBMCloud account:<\/li>\n<\/ul>\n<\/div>\n\n\n\n<pre class=\"hljs\" style=\"display: block; overflow-x: auto; padding: 0.5em; background-color: rgb(68, 68, 68); color: rgb(221, 221, 221);\">ibmcloud login <span class=\"hljs-_\">-a<\/span> https:\/\/api.eu-de.bluemix.net<\/pre>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><ul>\n<li>Install the IBMCloud Container Service Plug-In:<\/li>\n<\/ul>\n<\/div>\n\n\n\n<pre class=\"hljs\" style=\"display: block; overflow-x: auto; padding: 0.5em; background-color: rgb(68, 68, 68); color: rgb(221, 221, 221);\">ibmcloud plugin install container-service -r Bluemix<\/pre>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><ul>\n<li>Create the cluster (this takes several minutes):<\/li>\n<\/ul>\n<\/div>\n\n\n\n<pre class=\"hljs\" style=\"display: block; overflow-x: auto; padding: 0.5em; background-color: rgb(68, 68, 68); color: rgb(221, 221, 221);\">ibmcloud ks cluster-create --zone &lt;my_zone&gt; --name &lt;my_cluster&gt;\n<span class=\"hljs-comment\" style=\"color: rgb(119, 119, 119);\"># e.g. &lt;my_zone&gt; -&gt; mil01,<\/span>\n<span class=\"hljs-comment\" style=\"color: rgb(119, 119, 119);\"># &lt;my_cluster&gt; -&gt; radcup<\/span><\/pre>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><ul>\n<li>Check whether the cluster was created successfully:<\/li>\n<\/ul>\n<\/div>\n\n\n\n<pre class=\"hljs\" style=\"display: block; overflow-x: auto; padding: 0.5em; background-color: rgb(68, 68, 68); color: rgb(221, 221, 221);\">ibmcloud ks clusters\n\nName     ID                                 Status   Erstellt     Worker   Position   Version        Ressourcengruppenname   \nradcup   axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx   normal   6 days ago   1        mil01      1.10.11_1536   Default \n<\/pre>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><p>Once the cluster has been created, you can continue with the deployment of the images.<\/p>\n<hr>\n<p>Finding:<\/p>\n<p>In order to deploy the image, an image PullSecret must be created for the container registry. If this is not available and a deployment takes place, an error will appear in the web interface of the cluster because the cluster lacks the authorization to pull the needed image.<\/p>\n<ul>\n<li>Create the token:<\/li>\n<\/ul>\n<\/div>\n\n\n\n<pre class=\"hljs\" style=\"display: block; overflow-x: auto; padding: 0.5em; background-color: rgb(68, 68, 68); color: rgb(221, 221, 221);\">ibmcloud cr token-add --description <span class=\"hljs-string\" style=\"color: rgb(221, 136, 136);\">\"radcup\"<\/span> --non-expiring --readwrite<\/pre>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><ul>\n<li>Check whether the token was created:<\/li>\n<\/ul>\n<\/div>\n\n\n\n<pre class=\"hljs\" style=\"display: block; overflow-x: auto; padding: 0.5em; background-color: rgb(68, 68, 68); color: rgb(221, 221, 221);\">ibmcloud cr token-list\n\nTOKEN-ID                               SCHREIBGESCH\u00dcTZT   ABLAUF   BESCHREIBUNG   \nc192f4ad-xxxx-5208-98e4-xxxxxxxxxxxx   true               0        radcup    <\/pre>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><ul>\n<li>Get the value for your token:<\/li>\n<\/ul>\n<\/div>\n\n\n\n<pre class=\"hljs\" style=\"display: block; overflow-x: auto; padding: 0.5em; background-color: rgb(68, 68, 68); color: rgb(221, 221, 221);\">ibmcloud cr token-get &lt;token-id&gt;\n\n<span class=\"hljs-comment\" style=\"color: rgb(119, 119, 119);\"># e.g. &lt;token-id&gt; -&gt; c192f4ad-xxxx-5208-98e4-xxxxxxxxxxxx<\/span>\n\nRegistry-Token mit eindeutiger Kennung <span class=\"hljs-string\" style=\"color: rgb(221, 136, 136);\">'c192f4ad-xxxx-5208-98e4-xxxxxxxxxxxx'<\/span> wird abgerufen...\n              \nToken-ID   c192f4ad-xxxx-5208-98e4-xxxxxxxxxxxx   \nToken      value of the token\n<\/pre>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><ul>\n<li>Create the secret Kubernetes key to store your token information:<\/li>\n<\/ul>\n<\/div>\n\n\n\n<pre class=\"hljs\" style=\"display: block; overflow-x: auto; padding: 0.5em; background-color: rgb(68, 68, 68); color: rgb(221, 221, 221);\">kubectl --namespace &lt;kubernetes-namespace&gt; create secret docker-registry &lt;name_of_the_secret_key&gt;  --docker-server=&lt;registry-url&gt; --docker-username=token --docker-password=&lt;token_value&gt; --docker-email=&lt;docker<span class=\"hljs-_\">-e<\/span>-mail&gt;\n\n<span class=\"hljs-comment\" style=\"color: rgb(119, 119, 119);\"># e.g &lt;kubernetes-namespace&gt; -&gt; default, <\/span>\n<span class=\"hljs-comment\" style=\"color: rgb(119, 119, 119);\"># &lt;name_of_the_secret_key&gt; -&gt; radcup,<\/span>\n<span class=\"hljs-comment\" style=\"color: rgb(119, 119, 119);\"># &lt;registry-url&gt; -&gt; registry.eu-de.bluemix.net,<\/span>\n<span class=\"hljs-comment\" style=\"color: rgb(119, 119, 119);\"># &lt;token_value&gt; -&gt; value of the token (see above),<\/span>\n<span class=\"hljs-comment\" style=\"color: rgb(119, 119, 119);\"># &lt;docker-e-mail&gt; -&gt; a@b.c<\/span><\/pre>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><ul>\n<li>Check that the secret key was successfully created:<\/li>\n<\/ul>\n<\/div>\n\n\n\n<pre class=\"hljs\" style=\"display: block; overflow-x: auto; padding: 0.5em; background-color: rgb(68, 68, 68); color: rgb(221, 221, 221);\">kubectl get secrets --namespace &lt;kubernetes-namespace&gt;\n\n<span class=\"hljs-comment\" style=\"color: rgb(119, 119, 119);\"># e.g. &lt;kubernetes-namespace&gt; -&gt; default<\/span>\n<span class=\"hljs-comment\" style=\"color: rgb(119, 119, 119);\"># Attention: For this to work, you must first 'log in' to the cluster. Otherwise you will get an error.<\/span>\n\nNAME                                   TYPE                                     DATA   AGE\nradcup-hdm                        kubernetes.io\/dockerconfigjson        1      13d<\/pre>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><hr>\n<p>Two yaml files were defined in order to deploy the image stored in the container registry in the cluster and to make it accessible from outside:<\/p>\n<ul>\n<li>\n<p>web-controller.yaml<\/p>\n<ul>\n<li><strong>Notice:<\/strong>\n<ul>\n<li>We create a ReplicationController called web-controller, and we tell it to create two replicas of the template section (Pod configuration). The pod itself points to the container registry to load our image from there (please also see the imagePullSecrets section).<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/div>\n\n\n\n<pre class=\"hljs\" style=\"display: block; overflow-x: auto; padding: 0.5em; background-color: rgb(68, 68, 68); color: rgb(221, 221, 221);\"><span class=\"hljs-comment\" style=\"color: rgb(119, 119, 119);\"># web-controller.yaml<\/span>\n<span class=\"hljs-attr\">apiVersion:<\/span> v1\n<span class=\"hljs-attr\">kind:<\/span> ReplicationController\n<span class=\"hljs-attr\">metadata:<\/span>\n<span class=\"hljs-attr\">  labels:<\/span>\n<span class=\"hljs-attr\">    name:<\/span> web\n<span class=\"hljs-attr\">  name:<\/span> web-controller-version-radcup\n<span class=\"hljs-attr\">spec:<\/span>\n<span class=\"hljs-attr\">  replicas:<\/span> <span class=\"hljs-number\">2<\/span>\n<span class=\"hljs-attr\">  selector:<\/span>\n<span class=\"hljs-attr\">    app:<\/span> radcup-backend\n<span class=\"hljs-attr\">    version:<\/span> version-radcup\n<span class=\"hljs-attr\">  template:<\/span>\n<span class=\"hljs-attr\">    metadata:<\/span>\n<span class=\"hljs-attr\">      labels:<\/span>\n<span class=\"hljs-attr\">        name:<\/span> web\n<span class=\"hljs-attr\">        app:<\/span> radcup-backend\n<span class=\"hljs-attr\">        version:<\/span> version-radcup\n<span class=\"hljs-attr\">    spec:<\/span>\n<span class=\"hljs-attr\">      containers:<\/span>\n<span class=\"hljs-attr\">      - image:<\/span> registry.eu-de.bluemix.net\/system_engineering_radcup\/radcup_backend:version-radcup\n<span class=\"hljs-attr\">        name:<\/span> web\n<span class=\"hljs-attr\">        command:<\/span> [<span class=\"hljs-string\" style=\"color: rgb(221, 136, 136);\">\"bash\"<\/span>, <span class=\"hljs-string\" style=\"color: rgb(221, 136, 136);\">\"-c\"<\/span>]\n<span class=\"hljs-attr\">        args:<\/span> [<span class=\"hljs-string\" style=\"color: rgb(221, 136, 136);\">\"npm run testfromclusterandrun\"<\/span>]\n<span class=\"hljs-attr\">        env:<\/span>\n<span class=\"hljs-attr\">        - name:<\/span> NODE_ENV\n<span class=\"hljs-attr\">          value:<\/span> <span class=\"hljs-string\" style=\"color: rgb(221, 136, 136);\">\"testDBatlas\"<\/span>\n<span class=\"hljs-attr\">        ports:<\/span>\n<span class=\"hljs-attr\">        - containerPort:<\/span> <span class=\"hljs-number\">3000<\/span>\n<span class=\"hljs-attr\">          name:<\/span> http-server\n<span class=\"hljs-attr\">      imagePullSecrets:<\/span>\n<span class=\"hljs-attr\">      - name:<\/span> radcup-hdm\n<span class=\"hljs-attr\">      restartPolicy:<\/span> Always\n<\/pre>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><hr>\n<p><em>Adjustments in the course of the project:<\/em><\/p>\n<ul>\n<li>\n<p><code class=\"\" data-line=\"\">labels<\/code>: are key-value pairs which are attached to pods, replication controller and services. They are used as identifying attributes for objects such as pods and replication controller.<\/p>\n<\/li>\n<li>\n<p><code class=\"\" data-line=\"\">command and args<\/code>: starts the server in the container. Without these two lines, the Pod started, but then crashed immediately.<\/p>\n<\/li>\n<li>\n<p><code class=\"\" data-line=\"\">version<\/code>: Uniquely identifies the deployment. Required to be able to perform a rolling update.<\/p>\n<\/li>\n<\/ul>\n<p>In addition, the name of the replication controller has been extended so that it can be adapted more easily before a rolling update (keyword: uniqueness).<\/p>\n<hr>\n<\/div>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><ul>\n<li>\n<p>web-service.yaml<\/p>\n<ul>\n<li><strong>Notice:<\/strong>\n<ul>\n<li>We expose the service on port 80 internally within the cluster. That is, the service becomes visible on this port, and will send requests made to this port to the pods selected by the service. The TargetPort 3000 is the port on the pod that the requests gets sent to in this case.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/div>\n\n\n\n<pre class=\"hljs\" style=\"display: block; overflow-x: auto; padding: 0.5em; background-color: rgb(68, 68, 68); color: rgb(221, 221, 221);\"><span class=\"hljs-comment\" style=\"color: rgb(119, 119, 119);\"># web-service.yaml<\/span>\n<span class=\"hljs-attr\">apiVersion:<\/span> v1\n<span class=\"hljs-attr\">kind:<\/span> Service\n<span class=\"hljs-attr\">metadata:<\/span>\n<span class=\"hljs-attr\">  name:<\/span> web\n<span class=\"hljs-attr\">  labels:<\/span>\n<span class=\"hljs-attr\">    name:<\/span> web\n<span class=\"hljs-attr\">spec:<\/span>\n<span class=\"hljs-attr\">  type:<\/span> NodePort\n<span class=\"hljs-attr\">  ports:<\/span>\n<span class=\"hljs-attr\">    - port:<\/span> <span class=\"hljs-number\">80<\/span>\n<span class=\"hljs-attr\">      targetPort:<\/span> <span class=\"hljs-number\">3000<\/span>\n<span class=\"hljs-attr\">      protocol:<\/span> TCP\n<span class=\"hljs-attr\">  selector:<\/span>\n<span class=\"hljs-attr\">    name:<\/span> web<\/pre>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><hr>\n<p><em>Adjustments in the course of the project:<\/em><\/p>\n<ul>\n<li><code class=\"\" data-line=\"\">selector<\/code>: Used to select a set of objects. Without the selector, there was no connection between the controller and the service (so no access was possible). Therefore, it had to be added with the appropriate key.<\/li>\n<\/ul>\n<hr>\n<p>Now the ReplicationController and the service can be created. Several steps are also necessary for this:<\/p>\n<ul>\n<li>Log in to your IBM Cloud account:<\/li>\n<\/ul>\n<\/div>\n\n\n\n<pre class=\"hljs\" style=\"display: block; overflow-x: auto; padding: 0.5em; background-color: rgb(68, 68, 68); color: rgb(221, 221, 221);\">ibmcloud login <span class=\"hljs-_\">-a<\/span> https:\/\/api.eu-de.bluemix.net<\/pre>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><ul>\n<li>Target the IBM Cloud Container Service region in which you want to work:<\/li>\n<\/ul>\n<\/div>\n\n\n\n<pre class=\"hljs\" style=\"display: block; overflow-x: auto; padding: 0.5em; background-color: rgb(68, 68, 68); color: rgb(221, 221, 221);\">ibmcloud cs region-set eu-central<\/pre>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><ul>\n<li>Get the command to set the environment variable and download the Kubernetes configuration files:<\/li>\n<\/ul>\n<\/div>\n\n\n\n<pre class=\"hljs\" style=\"display: block; overflow-x: auto; padding: 0.5em; background-color: rgb(68, 68, 68); color: rgb(221, 221, 221);\">ibmcloud cs cluster-config &lt;my_cluster&gt;\n<span class=\"hljs-comment\" style=\"color: rgb(119, 119, 119);\"># e.g. &lt;my_cluster&gt; -&gt; radcup<\/span><\/pre>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><ul>\n<li>Set the KUBECONFIG environment variable. Copy the output from the previous command and paste it in your terminal:<\/li>\n<\/ul>\n<\/div>\n\n\n\n<pre class=\"hljs\" style=\"display: block; overflow-x: auto; padding: 0.5em; background-color: rgb(68, 68, 68); color: rgb(221, 221, 221);\"><span class=\"hljs-comment\" style=\"color: rgb(119, 119, 119);\"># The command output should look similar to the following command<\/span>\n<span class=\"hljs-built_in\" style=\"color: rgb(221, 136, 136);\">export<\/span> KUBECONFIG=\/Users\/<span class=\"hljs-variable\" style=\"color: rgb(221, 136, 136);\">$USER<\/span>\/.bluemix\/plugins\/container-service\/clusters\/&lt;my_cluster&gt;\/kube-config-&lt;my_zone&gt;-radcup.yml\n<span class=\"hljs-comment\" style=\"color: rgb(119, 119, 119);\"># e.g. &lt;my_cluster&gt; -&gt; radcup,<\/span>\n<span class=\"hljs-comment\" style=\"color: rgb(119, 119, 119);\"># &lt;my_zone&gt; -&gt; mil01<\/span><\/pre>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><ul>\n<li>Verify that you can connect to your cluster by listing your worker nodes:<\/li>\n<\/ul>\n<\/div>\n\n\n\n<pre class=\"hljs\" style=\"display: block; overflow-x: auto; padding: 0.5em; background-color: rgb(68, 68, 68); color: rgb(221, 221, 221);\">kubectl get nodes\n\nNAME             STATUS   ROLES    AGE   VERSION\n10.144.xxx.xxx   Ready    &lt;none&gt;   6d    v1.10.11+IKS<\/pre>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><p>The ReplicationController and the service can be created as follows:<\/p>\n<\/div>\n\n\n\n<pre class=\"hljs\" style=\"display: block; overflow-x: auto; padding: 0.5em; background-color: rgb(68, 68, 68); color: rgb(221, 221, 221);\">kubectl create <span class=\"hljs-_\">-f<\/span> web-controller.yaml\n\nkubectl create <span class=\"hljs-_\">-f<\/span> web-service.yaml<\/pre>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><p>After executing the commands, the image is deployed and retrievable.<\/p>\n<hr>\n<p>Finding:<\/p>\n<p>Since the public IP address of the cluster and the port under which the service can be accessed are not directly known, the backend could not be accessed directly. Therefore, these had to be found out accordingly.<\/p>\n<p>Cluster-IP:<\/p>\n<\/div>\n\n\n\n<pre class=\"hljs\" style=\"display: block; overflow-x: auto; padding: 0.5em; background-color: rgb(68, 68, 68); color: rgb(221, 221, 221);\">ibmcloud ks workers &lt;cluster_name&gt;\n\n<span class=\"hljs-comment\" style=\"color: rgb(119, 119, 119);\"># e.g. &lt;cluster_name&gt; -&gt; radcup<\/span>\n\nID                                                 \u00d6ffentliche IP    Private IP       Maschinentyp   Status   Status   Zone    Version   \nkube-mil01-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx   159.122.181.248   10.xxx.xxx.xxx   free           normal   Ready    mil01   1.10.11_1537<\/pre>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><p>Service-Port:<\/p>\n<\/div>\n\n\n\n<pre class=\"hljs\" style=\"display: block; overflow-x: auto; padding: 0.5em; background-color: rgb(68, 68, 68); color: rgb(221, 221, 221);\">kubectl describe service &lt;service_name&gt;\n\n<span class=\"hljs-comment\" style=\"color: rgb(119, 119, 119);\"># e.g. &lt;service_name&gt; -&gt; web<\/span>\n\nName:                     web\nNamespace:          default\nLabels:                    name=web\n...\nSelector:                 name=web\nType:                       NodePort\n...\nPort:                         &lt;<span class=\"hljs-built_in\" style=\"color: rgb(221, 136, 136);\">unset<\/span>&gt;  80\/TCP\nTargetPort:             3000\/TCP\nNodePort:               &lt;<span class=\"hljs-built_in\" style=\"color: rgb(221, 136, 136);\">unset<\/span>&gt;  30304\/TCP\n...<\/pre>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><p>Accordingly, the radcup backend would be accessible under http:\/\/159.122.181.248:30304\/api, for example.<\/p>\n<hr>\n<\/div>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><h3>Kubernetes Load Balancing<\/h3>\n<\/div>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><p>Problem: If the utilization of a Pod is too high, not all requests arrive and the availability of the backend will decrease.<\/p>\n<p>One possible solution is the <a href=\"https:\/\/kubernetes.io\/docs\/tasks\/run-application\/horizontal-pod-autoscale\/\">Horizontal Pod Autoscaler (HPA)<\/a> from Kubernetes.The HPA automatically scales the number of pods in a replication controller, deployment or replica set based on observed CPU usage or other metrics.<\/p>\n<\/div>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"4697\" data-permalink=\"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2019\/01\/17\/radcup-part-2-cloud\/autoscaler_kubernetes\/\" data-orig-file=\"https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/autoscaler_kubernetes.jpg\" data-orig-size=\"830,736\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"autoscaler_kubernetes\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/autoscaler_kubernetes.jpg\" src=\"https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/autoscaler_kubernetes.jpg\" alt=\"\" class=\"wp-image-4697\" width=\"512\" height=\"454\" srcset=\"https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/autoscaler_kubernetes.jpg 830w, https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/autoscaler_kubernetes-300x266.jpg 300w, https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/autoscaler_kubernetes-768x681.jpg 768w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><figcaption>Functionality of the HPA<\/figcaption><\/figure>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><p>Requirements for the HPA to work:<\/p>\n<ul>\n<li>In the cluster <a href=\"https:\/\/developer.ibm.com\/tutorials\/autoscale-application-on-kubernetes-cluster\/\">heapster with an Influxdb and Grafana was applied<\/a>.<\/li>\n<li>Extension of the web-controller.yaml by the following lines (In the Pod configuration area):<\/li>\n<\/ul>\n<\/div>\n\n\n\n<pre class=\"hljs\" style=\"display: block; overflow-x: auto; padding: 0.5em; background-color: rgb(68, 68, 68); color: rgb(221, 221, 221);\">...\n<span class=\"hljs-attr\">        resources:<\/span>\n<span class=\"hljs-attr\">          requests:<\/span>\n<span class=\"hljs-attr\">            cpu:<\/span> <span class=\"hljs-number\">100<\/span>m\n...<\/pre>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><p>We did not take these prerequisites into account at the outset, which meant that the HPA was active but did not scale even at high capacity utilization.\nEspecially the extension of the web-controller.yaml was not directly visible. Only after some research it became clear that we need to set &quot;cpu&quot; as a resource request on the container.<\/p>\n<hr>\n<p>Finding:<\/p>\n<p>If HPA is activated, it needs the field <code class=\"\" data-line=\"\">request.cpu<\/code> to be able to calculate the current load based on it and consequently boot new pods or shutdown existing ones.<\/p>\n<hr>\n<p>This is not done automatically when creating an hpa object nor does Kubernetes warns you about it.This point was quite frustrating, as the solution is quite simple.\nIf the prerequisites are fulfilled, the HPA can be activated either by yaml file or CLI:<\/p>\n<ul>\n<li>hpa_rc.yaml<\/li>\n<\/ul>\n<\/div>\n\n\n\n<pre class=\"hljs\" style=\"display: block; overflow-x: auto; padding: 0.5em; background-color: rgb(68, 68, 68); color: rgb(221, 221, 221);\"><span class=\"hljs-attr\">apiVersion:<\/span> autoscaling\/v1\n<span class=\"hljs-attr\">kind:<\/span> HorizontalPodAutoscaler\n<span class=\"hljs-attr\">metadata:<\/span>\n<span class=\"hljs-attr\">  name:<\/span> web-scale\n<span class=\"hljs-attr\">spec:<\/span>\n<span class=\"hljs-attr\">  scaleTargetRef:<\/span>\n<span class=\"hljs-attr\">    kind:<\/span> ReplicationController\n<span class=\"hljs-attr\">    name:<\/span> web-controller\n<span class=\"hljs-attr\">  minReplicas:<\/span> <span class=\"hljs-number\">2<\/span>\n<span class=\"hljs-attr\">  maxReplicas:<\/span> <span class=\"hljs-number\">10<\/span>\n<span class=\"hljs-attr\">  targetCPUUtilizationPercentage:<\/span> <span class=\"hljs-number\">25<\/span>\n<\/pre>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><ul>\n<li>Via CLI<\/li>\n<\/ul>\n<\/div>\n\n\n\n<pre class=\"hljs\" style=\"display: block; overflow-x: auto; padding: 0.5em; background-color: rgb(68, 68, 68); color: rgb(221, 221, 221);\">kubectl autoscale rc &lt;name_of_controller&gt; --cpu-percent=25 --min=2 --max=10\n\n<span class=\"hljs-comment\" style=\"color: rgb(119, 119, 119);\"># e.g. &lt;name_of_controller&gt; -&gt; web-controller<\/span><\/pre>\n\n\n\n<div class=\"wp-block-jetpack-markdown\"><p>Result: If the HPA detects a load of 25%, further instances are started up and as soon as this load drops again, they are shutdown again.\nThis was checked with curl loops and the <a href=\"https:\/\/gatling.io\">Gatling tool<\/a>, among other things.<\/p>\n<hr>\n<p>The following pictures provide an overview of the cluster with one ReplicationController without HPA and one with activated HPA:<\/p>\n<\/div>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"3306\" height=\"936\" data-attachment-id=\"4843\" data-permalink=\"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2019\/01\/17\/radcup-part-2-cloud\/whpa2_kub\/\" data-orig-file=\"https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/whpa2_kub.png\" data-orig-size=\"3306,936\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"whpa2_kub\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/whpa2_kub-1024x290.png\" src=\"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/whpa2_kub.png?fit=656%2C186&amp;ssl=1\" alt=\"\" class=\"wp-image-4843\" srcset=\"https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/whpa2_kub.png 3306w, https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/whpa2_kub-300x85.png 300w, https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/whpa2_kub-768x217.png 768w, https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/whpa2_kub-1024x290.png 1024w\" sizes=\"auto, (max-width: 3306px) 100vw, 3306px\" \/><figcaption>ReplicationController without HPA <\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"3416\" height=\"1556\" data-attachment-id=\"4844\" data-permalink=\"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2019\/01\/17\/radcup-part-2-cloud\/bildschirmfoto-2019-01-10-um-19-02-52\/\" data-orig-file=\"https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Bildschirmfoto-2019-01-10-um-19.02.52.png\" data-orig-size=\"3416,1556\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Bildschirmfoto 2019-01-10 um 19.02.52\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Bildschirmfoto-2019-01-10-um-19.02.52-1024x466.png\" src=\"https:\/\/i1.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Bildschirmfoto-2019-01-10-um-19.02.52.png?fit=656%2C299&amp;ssl=1\" alt=\"\" class=\"wp-image-4844\" srcset=\"https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Bildschirmfoto-2019-01-10-um-19.02.52.png 3416w, https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Bildschirmfoto-2019-01-10-um-19.02.52-300x137.png 300w, https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Bildschirmfoto-2019-01-10-um-19.02.52-768x350.png 768w, https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Bildschirmfoto-2019-01-10-um-19.02.52-1024x466.png 1024w, https:\/\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Bildschirmfoto-2019-01-10-um-19.02.52-656x300.png 656w\" sizes=\"auto, (max-width: 3416px) 100vw, 3416px\" \/><figcaption>ReplicationController with HPA<\/figcaption><\/figure>\n\n\n\n<p>As you can see, the load (which was generated with Gatling) was distributed to the two existing pods by the ReplicationController without HPA. In comparison, the ReplicationController with HPA booted two new Pod instances. Consequently, the correct configuration of HPA could be verified.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Written by: Immanuel Haag, Christian M\u00fcller, Marc R\u00fcttler Several steps are necessary to transfer the Radcup backend to the cloud and make it accessible to everyone from the outside. These are explained in more detail in the following sections.<\/p>\n","protected":false},"author":884,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[651,2],"tags":[61,9,3,207,97,98,47,129,11,155],"ppma_author":[762],"class_list":["post-4403","post","type-post","status-publish","format-standard","hentry","category-system-designs","category-system-engineering","tag-containers","tag-devops","tag-docker","tag-gatling","tag-git","tag-gitlab","tag-ibm","tag-ibm-bluemix","tag-loadbalancing","tag-mongodb"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":4395,"url":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2019\/01\/17\/radcup-a-socialmedia-beerpong-app\/","url_meta":{"origin":4403,"position":0},"title":"Radcup &#8211; a socialmedia beerpong App","author":"Immanuel Haag","date":"17. January 2019","format":false,"excerpt":"Written by: Immanuel Haag, Christian M\u00fcller, Marc R\u00fcttler Radcup adds a bit of social media to the well-known game Beerpong. With Radcup the user has the possibility to register or login. Afterwards he can display\/localize already existing games and join them if possible or create new games. As soon as\u2026","rel":"","context":"In &quot;System Designs&quot;","block_context":{"text":"System Designs","link":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/category\/system-designs\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Screen-Shot-2019-01-06-at-15.09.35.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Screen-Shot-2019-01-06-at-15.09.35.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Screen-Shot-2019-01-06-at-15.09.35.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":4405,"url":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2019\/01\/04\/radcup-part-3-automation\/","url_meta":{"origin":4403,"position":1},"title":"Radcup Part 3 &#8211; Automation with Gitlab CI\/CD","author":"Immanuel Haag","date":"4. January 2019","format":false,"excerpt":"Written by: Immanuel Haag, Christian M\u00fcller, Marc R\u00fcttler The goal of this blog entry is to automate the previously performed steps. At the end all manual steps should be automated when new code changes are added to the repository. The new version of the backend will be made available in\u2026","rel":"","context":"In &quot;DevOps&quot;","block_context":{"text":"DevOps","link":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/category\/scalable-systems\/devops\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Gesamtstruktur-der-Architektur-Kurzform-1.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Gesamtstruktur-der-Architektur-Kurzform-1.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Gesamtstruktur-der-Architektur-Kurzform-1.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Gesamtstruktur-der-Architektur-Kurzform-1.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2019\/01\/Gesamtstruktur-der-Architektur-Kurzform-1.png?resize=1050%2C600&ssl=1 3x"},"classes":[]},{"id":26208,"url":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2024\/02\/29\/die-meere-der-systemtechnik-navigieren-eine-reise-durch-die-bereitstellung-einer-aktien-webanwendung-in-der-cloud\/","url_meta":{"origin":4403,"position":2},"title":"Die Meere der Systemtechnik navigieren: Eine Reise durch die Bereitstellung einer Aktien-Webanwendung in der Cloud","author":"mk306","date":"29. February 2024","format":false,"excerpt":"Auf zu neuen Ufern: Einleitung Die Cloud-Computing-Technologie hat die Art und Weise, wie Unternehmen Anwendungen entwickeln, bereitstellen und skalieren, revolutioniert. In diesem Beitrag, der im Rahmen der Vorlesung \u201c143101a System Engineering und Management\u201d entstanden ist, werden wir uns darauf konzentrieren, wie eine bereits bestehende Webanwendung zur Visualisierung und Filterung von\u2026","rel":"","context":"In &quot;Cloud Technologies&quot;","block_context":{"text":"Cloud Technologies","link":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/category\/scalable-systems\/cloud-technologies\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2024\/02\/Dashboard2-Kopie-1.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2024\/02\/Dashboard2-Kopie-1.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2024\/02\/Dashboard2-Kopie-1.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2024\/02\/Dashboard2-Kopie-1.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2024\/02\/Dashboard2-Kopie-1.png?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2024\/02\/Dashboard2-Kopie-1.png?resize=1400%2C800&ssl=1 4x"},"classes":[]},{"id":2859,"url":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2017\/08\/31\/iot-with-the-raspberry-pi-final-application-part-3\/","url_meta":{"origin":4403,"position":3},"title":"IoT with the Raspberry Pi \u2013 Final application \u2013 Part 3","author":"mr143@hdm-stuttgart.de","date":"31. August 2017","format":false,"excerpt":"In our final application, we have put together a solution consisting of four different modules. First, we have again the Raspberry Pi which raises and sends the sensor data using the already presented Python script. We changed the transfer protocol in the final application to MQTT, which gives us more\u2026","rel":"","context":"In &quot;Allgemein&quot;","block_context":{"text":"Allgemein","link":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/category\/allgemein\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/08\/mqtt-1024x465.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/08\/mqtt-1024x465.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/blog.mi.hdm-stuttgart.de\/wp-content\/uploads\/2017\/08\/mqtt-1024x465.jpg?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":11651,"url":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2020\/09\/29\/circle-clicker\/","url_meta":{"origin":4403,"position":4},"title":"Your first Web App in the cloud &#8211; AWS and Beanstalk","author":"mf144","date":"29. September 2020","format":false,"excerpt":"Hello fellow readers!\u00a0In this blog you will learn how to set up a web-game with worldwide ranking in the cloud without having to deal with complicated deployment. That means for you: More time on your application.\u00a0 The app uses Node.js with Express and MongoDB as backend. The frontend is made\u2026","rel":"","context":"In &quot;Cloud Technologies&quot;","block_context":{"text":"Cloud Technologies","link":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/category\/scalable-systems\/cloud-technologies\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3400,"url":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/2018\/03\/28\/testing-a-mongodb-with-nodejs-mocha-and-mongoose\/","url_meta":{"origin":4403,"position":5},"title":"Testing a MongoDB with NodeJS, Mocha and Mongoose","author":"Domenik Jockers","date":"28. March 2018","format":false,"excerpt":"Related articles:\u00a0\u25baTake Me Home - Project Overview\u00a0 \u25baCI\/CD infrastructure: Choosing and setting up a server with Jenkins as Docker image\u00a0\u25baAndroid SDK and emulator in Docker for testing\u00a0 \u25baAutomated Unit- and GUI-Testing for Android in Jenkins\u00a0 Setting up the testing environment and workflow Setup: Jenkins CI Docker Container MongoDB Docker Container\u2026","rel":"","context":"In &quot;Databases&quot;","block_context":{"text":"Databases","link":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/category\/scalable-systems\/databases\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"authors":[{"term_id":762,"user_id":884,"is_guest":0,"slug":"ih038","display_name":"Immanuel Haag","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/3095f100f75fe977c838303e854bb8cd3ffc7fbf01963610781fcd51bb5a4680?s=96&d=mm&r=g","0":null,"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""}],"_links":{"self":[{"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/posts\/4403","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/users\/884"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/comments?post=4403"}],"version-history":[{"count":91,"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/posts\/4403\/revisions"}],"predecessor-version":[{"id":6623,"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/posts\/4403\/revisions\/6623"}],"wp:attachment":[{"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/media?parent=4403"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/categories?post=4403"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/tags?post=4403"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/blog.mi.hdm-stuttgart.de\/index.php\/wp-json\/wp\/v2\/ppma_author?post=4403"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}