{"id":2643,"date":"2022-02-03T14:39:09","date_gmt":"2022-02-03T05:39:09","guid":{"rendered":"https:\/\/jennifersoft.com\/en\/?p=2643"},"modified":"2024-04-16T13:38:21","modified_gmt":"2024-04-16T04:38:21","slug":"2022-02-22","status":"publish","type":"post","link":"https:\/\/jennifersoft.com\/en\/blog\/kubernetes\/2022-02-22\/","title":{"rendered":"JENNIFER \u2013 Kubernetes Environment (AKS, EKS, GKE,\u2026) Supports"},"content":{"rendered":"\n<figure class=\"wp-block-image big\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"683\" src=\"https:\/\/jennifersoft.com\/en\/wp-content\/uploads\/sites\/3\/2022\/02\/\ube14\ub85c\uadf8_\ucee4\ubc84_01_0221-1024x683.jpg\" alt=\"\" class=\"wp-image-2665\" srcset=\"https:\/\/jennifersoft.com\/en\/wp-content\/uploads\/sites\/3\/2022\/02\/\ube14\ub85c\uadf8_\ucee4\ubc84_01_0221-1024x683.jpg 1024w, https:\/\/jennifersoft.com\/en\/wp-content\/uploads\/sites\/3\/2022\/02\/\ube14\ub85c\uadf8_\ucee4\ubc84_01_0221-120x80.jpg 120w, https:\/\/jennifersoft.com\/en\/wp-content\/uploads\/sites\/3\/2022\/02\/\ube14\ub85c\uadf8_\ucee4\ubc84_01_0221-300x200.jpg 300w, https:\/\/jennifersoft.com\/en\/wp-content\/uploads\/sites\/3\/2022\/02\/\ube14\ub85c\uadf8_\ucee4\ubc84_01_0221.jpg 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Evolution to the Container Environment<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Container virtualization\ntechnology that provides virtualization enhanced to another level unlike the VM\nthat virtualizes physical machines is now successfully being introduced in the\noperation environment in conjunction with the activated microservice. However,\nthe container layer is provided in such a way to simply separate the execution\nenvironment from the operation environment, thus from the perspectives of\ndirect operation, it can be achieved in small services only, and there are lots\nof difficulties in operating a large service in the real world. In other words,\nas shown in \u201cFigure 1,\u201d in case that an operator has to deal with the multiple\ncontainers, it is highly likely to lead to a managerial mistake.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"350\" src=\"https:\/\/jennifersoft.com\/en\/wp-content\/uploads\/sites\/3\/2022\/02\/\ube14\ub85c\uadf8_\uc778\ud3ec\uadf8\ub798\ud53d_01_0219-1024x350.png\" alt=\"\" class=\"wp-image-2668\" srcset=\"https:\/\/jennifersoft.com\/en\/wp-content\/uploads\/sites\/3\/2022\/02\/\ube14\ub85c\uadf8_\uc778\ud3ec\uadf8\ub798\ud53d_01_0219.png 1024w, https:\/\/jennifersoft.com\/en\/wp-content\/uploads\/sites\/3\/2022\/02\/\ube14\ub85c\uadf8_\uc778\ud3ec\uadf8\ub798\ud53d_01_0219-300x103.png 300w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption> [ Figure 1 : Operator Managing Mutiple Containers on their own ] <\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">To supplement for this\nweakness, there are now orchestration tools that can abstract container\nmanagement. Thus, the system operator, as shown in \u201cFigure 2,\u201d can use the\norchestration tools to handle multiple containers and now, it is possible to\nfacilitate introduction of container technologies for a large scale service.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"350\" src=\"https:\/\/jennifersoft.com\/en\/wp-content\/uploads\/sites\/3\/2022\/02\/\ube14\ub85c\uadf8_\uc778\ud3ec\uadf8\ub798\ud53d_02_0219-1024x350.png\" alt=\"\" class=\"wp-image-2669\" srcset=\"https:\/\/jennifersoft.com\/en\/wp-content\/uploads\/sites\/3\/2022\/02\/\ube14\ub85c\uadf8_\uc778\ud3ec\uadf8\ub798\ud53d_02_0219.png 1024w, https:\/\/jennifersoft.com\/en\/wp-content\/uploads\/sites\/3\/2022\/02\/\ube14\ub85c\uadf8_\uc778\ud3ec\uadf8\ub798\ud53d_02_0219-300x103.png 300w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption> [ Figure 2 : Orchestration Tools Abstracting Mutiple Containers(k8s) ] <\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Those companies that\nprovide cloud services are now making a quick move to introduce such changes in\nthe operation environment to their product lines. Why? Because even if there\nare orchestration tools, eventually, we must have infrastructure that activates\ncontainer technologies. Eventually, cloud service provider can provide\nperfectly abstract container services simply by placing the k8s service on top\non the exiting virtual infrastructure environment, and this is well in line\nwith the \u201cinfrastructure management cost reduction\u201d that all the cloud services\nemphasize. At present, reflecting such a trend, there are many services in\noperation such as Azure\u2019s AKS, GCP\u2019s GKE, AWS\u2019s EKS and so on. <\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"480\" src=\"https:\/\/jennifersoft.com\/en\/wp-content\/uploads\/sites\/3\/2022\/02\/\ube14\ub85c\uadf8_\uc778\ud3ec\uadf8\ub798\ud53d_03_0219-1024x480.png\" alt=\"\" class=\"wp-image-2670\" srcset=\"https:\/\/jennifersoft.com\/en\/wp-content\/uploads\/sites\/3\/2022\/02\/\ube14\ub85c\uadf8_\uc778\ud3ec\uadf8\ub798\ud53d_03_0219.png 1024w, https:\/\/jennifersoft.com\/en\/wp-content\/uploads\/sites\/3\/2022\/02\/\ube14\ub85c\uadf8_\uc778\ud3ec\uadf8\ub798\ud53d_03_0219-300x141.png 300w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>[ Figure 3 : Service from cloud companies providing k8s ] <\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">JENNIFER Agents\u2019 Supports for k8s<\/h2>\n\n\n\n<p style=\"font-size:14px;background:#F4F7FF;border-radius:10px\" class=\"has-background has-very-light-gray-background-color\"><strong>Note<\/strong><br> We take the AKS enviroment for an example in this article, but from the perspectives of JENNIFER product, it it eventually about supporting k8s, so it can be supported in all other environments in a similar way<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In addition, there are many different container technologies but here we will just focus on explaining dokers.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><br><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"> Basically, a Jennifer agent supports k8s in the same way that it supports the container environment. Eventually, we would have to notify the container about the execution file and environment variable settings and in the past, a Jennifer agent was activated in the docker environment in the following 2 ways.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li> Designate the volume and the environment variable for the agent&#8217;s binary. <\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"360\" src=\"https:\/\/jennifersoft.com\/en\/wp-content\/uploads\/sites\/3\/2022\/02\/\ube14\ub85c\uadf8_\uc778\ud3ec\uadf8\ub798\ud53d_04_0219-1024x360.png\" alt=\"\" class=\"wp-image-2671\" srcset=\"https:\/\/jennifersoft.com\/en\/wp-content\/uploads\/sites\/3\/2022\/02\/\ube14\ub85c\uadf8_\uc778\ud3ec\uadf8\ub798\ud53d_04_0219.png 1024w, https:\/\/jennifersoft.com\/en\/wp-content\/uploads\/sites\/3\/2022\/02\/\ube14\ub85c\uadf8_\uc778\ud3ec\uadf8\ub798\ud53d_04_0219-300x105.png 300w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">    2.  Build by including the agent binary and the environment variable in       the existing container\u2019s dockerfile <\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"360\" src=\"https:\/\/jennifersoft.com\/en\/wp-content\/uploads\/sites\/3\/2022\/02\/\ube14\ub85c\uadf8_\uc778\ud3ec\uadf8\ub798\ud53d_05_0219-1024x360.png\" alt=\"\" class=\"wp-image-2672\" srcset=\"https:\/\/jennifersoft.com\/en\/wp-content\/uploads\/sites\/3\/2022\/02\/\ube14\ub85c\uadf8_\uc778\ud3ec\uadf8\ub798\ud53d_05_0219.png 1024w, https:\/\/jennifersoft.com\/en\/wp-content\/uploads\/sites\/3\/2022\/02\/\ube14\ub85c\uadf8_\uc778\ud3ec\uadf8\ub798\ud53d_05_0219-300x105.png 300w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption> <\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"> k8s orchestration tools involve distribution of pod units by wrapping a container at one level, thus the agent\u2019s support for k8s is limited to within the above 2 principles. In practice, method 2 can be used as it is in the k8s environment, too. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"> However, unlike the existing structure directly connected to a container, due to the characteristics that the volume is connected to the pod that can be a group of container, it connects the agent&#8217;s binary and container through the PV (persistent volume) set by k8s.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"> Once the volume containing the agent\u2019s binary is prepared, a user just has to add the volume connected to the PV and the env setting in the yaml file for the service distribution after that.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"atomic\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">apiVersion: apps\/v1\nkind: Deployment\nmetadata:\n  name: net-razor31-sample\n...[Omitted]...\nspec:\n  ...[Omitted]...\n  template:\n    ...[Omitted]...\n    spec:\n      containers:\n        ...[Omitted]...\n        env:\n        - name: CORECLR_ENABLE_PROFILING\n          value: \"1\"\n        - name: CORECLR_PROFILER\n          value: \"{6C7CAF0F-D0E5-4274-A71B-6551761BBDC8}\"\n        - name: CORECLR_PROFILER_PATH\n          value: \"\/netagent\/bin\/libAriesProfiler.so\"\n        - name: ARIES_SERVER_ADDRESS\n          value: \"127.0.0.1\"\n        - name: ARIES_SERVER_PORT\n          value: \"5000\"\n        - name: ARIES_DOMAIN_ID\n          value: \"1000\"\n        volumeMounts:\n        - mountPath: \"\/netagent\"\n          name: volume\n      volumes:\n        - name: volume\n          persistentVolumeClaim:\n            claimName: my-agent-file\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After that, a user can use\nkubectl to apply yaml and then check that monitoring works properly.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"atomic\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$ kubectl apply -f demo.yaml<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">As advantages of the cloud\nplatform, a user can freely add or delete abstract infrastructure based walker nodes\nto k8s. At the same time, a user can manually or automatically scale the number\nof pod instances in the app. K8s supports Horizontal Pod Autoscaling\n(hereinafter, hpa) for automatic scaling, and a user can use the same command\nin AKS, too. For example, if one instance is set and executed in the above\n\u201cdemo.yaml\u201d distributed, and max 3 units are run depending on the load, then it\ncan be run as follows.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"atomic\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$ kubectl autoscale deployment --max=3 net-razor31-sample --min=1\nhorizontalpodautoscaler.autoscaling\/net-razor31-sample autoscaled\n$ kubectl get pod\nNAME                                  READY   STATUS    RESTARTS   AGE\nnet-razor31-sample-6b747bb886-c2kgk   1\/1     Running   0          116s\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nAs seen here, even without the\nload, 1 pod is operated but there can be none in the Jennifer console. Why?\nBecause there can be a difference between the uploaded pod and the request sent\nto the internal application.\n\n\n\n<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Of course, if a load test\nis performed in this condition,<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"atomic\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$ docker run --name loadtest --rm -it azch\/loadtest http:\/\/...[Service URL]<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">3 pods will be automatically uploaded and a user can check the\nresults in the Jennifer console.<br>\n<br>\n<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"940\" height=\"597\" src=\"https:\/\/jennifersoft.com\/en\/wp-content\/uploads\/sites\/3\/2022\/02\/image-5.jpg\" alt=\"\" class=\"wp-image-2689\" srcset=\"https:\/\/jennifersoft.com\/en\/wp-content\/uploads\/sites\/3\/2022\/02\/image-5.jpg 940w, https:\/\/jennifersoft.com\/en\/wp-content\/uploads\/sites\/3\/2022\/02\/image-5-300x191.jpg 300w\" sizes=\"auto, (max-width: 940px) 100vw, 940px\" \/><figcaption>[ Figure  4 :  monitoring screen through JENNIFER ]<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"Evolution to the Container Environment Container virtualization technology that provides virtualization enhanced to another level unlike the VM that virtualizes&#8230;","protected":false},"author":20,"featured_media":2665,"comment_status":"closed","ping_status":"closed","sticky":true,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[140],"tags":[141],"class_list":["post-2643","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-kubernetes","tag-kubernetes"],"acf":[],"_links":{"self":[{"href":"https:\/\/jennifersoft.com\/en\/wp-json\/wp\/v2\/posts\/2643","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jennifersoft.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jennifersoft.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jennifersoft.com\/en\/wp-json\/wp\/v2\/users\/20"}],"replies":[{"embeddable":true,"href":"https:\/\/jennifersoft.com\/en\/wp-json\/wp\/v2\/comments?post=2643"}],"version-history":[{"count":16,"href":"https:\/\/jennifersoft.com\/en\/wp-json\/wp\/v2\/posts\/2643\/revisions"}],"predecessor-version":[{"id":2690,"href":"https:\/\/jennifersoft.com\/en\/wp-json\/wp\/v2\/posts\/2643\/revisions\/2690"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jennifersoft.com\/en\/wp-json\/wp\/v2\/media\/2665"}],"wp:attachment":[{"href":"https:\/\/jennifersoft.com\/en\/wp-json\/wp\/v2\/media?parent=2643"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jennifersoft.com\/en\/wp-json\/wp\/v2\/categories?post=2643"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jennifersoft.com\/en\/wp-json\/wp\/v2\/tags?post=2643"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}