{"id":125,"date":"2022-12-25T17:48:53","date_gmt":"2022-12-25T17:48:53","guid":{"rendered":"https:\/\/devopsopen.com\/?p=125"},"modified":"2022-12-26T00:42:53","modified_gmt":"2022-12-26T00:42:53","slug":"application-lifecycle-management","status":"publish","type":"post","link":"https:\/\/devopsopen.com\/index.php\/2022\/12\/25\/application-lifecycle-management\/","title":{"rendered":"Application Lifecycle Management"},"content":{"rendered":"<h1>Application Lifecycle Management<\/h1>\n<h4 id=\"Summary\">Summary<\/h4>\n<ul class=\"ez-toc-page-1 ez-toc-heading-level-2\">\n<li><a title=\"Rolling Updates and Rollbacks in Deployments\" href=\"#Rolling Updates and Rollbacks in Deployments\">\u00a0Rolling Updates and Rollbacks in Deployments<\/a><\/li>\n<li><a title=\"Configure Applications\" href=\"#Configure Applications\">\u00a0Configure Applications<\/a><\/li>\n<li><a title=\"Scale Applications\" href=\"#Scale Applications\">\u00a0Scale Applications<\/a><\/li>\n<li><a title=\"Self-Healing Application\" href=\"#Self-Healing Application\">\u00a0Self-Healing Application<\/a><\/li>\n<\/ul>\n<h2 id=\"Rolling Updates and Rollbacks in Deployments\"><a title=\"Summary\" href=\"#Summary\">Rolling Updates and Rollbacks in Deployments<\/a><\/h2>\n<p>Deployment strategy: there is two strategies<\/p>\n<ul>\n<li>Recreate : delete all pods and create new pods ==&gt; <span class=\"Y2IQFc\" lang=\"en\">unavailability of applications<\/span><\/li>\n<\/ul>\n<pre><code class=\"hljs properties\"><span class=\"hljs-attr\">spec<\/span>:\r\n <span class=\"hljs-attr\">strategy<\/span>:\r\n   <span class=\"hljs-attr\">type<\/span>: <span class=\"hljs-string\">Recreate<\/span><\/code><\/pre>\n<ul>\n<li>Rolling Update : delete and create pods one by one or 2 by 2 ... (default strategy in K8S)<\/li>\n<\/ul>\n<pre><code class=\"hljs properties\"><span class=\"hljs-attr\">spec<\/span>:\r\n <span class=\"hljs-attr\">strategy<\/span>:\r\n   <span class=\"hljs-attr\">type<\/span>: <span class=\"hljs-string\">RollingUpdate<\/span>\r\n   <span class=\"hljs-attr\">rollingUpdate<\/span>:\r\n     <span class=\"hljs-attr\">maxUnavailable<\/span>: <span class=\"hljs-string\">0<\/span>\r\n     <span class=\"hljs-attr\">maxSurge<\/span>: <span class=\"hljs-string\">1<\/span><\/code><\/pre>\n<blockquote><p><span id=\"undefined\" class=\"markedContent\"><\/span><span id=\"page64R_mcid0\" class=\"markedContent\"><span dir=\"ltr\" role=\"presentation\">Summarize Commands<\/span><\/span><span id=\"page64R_mcid1\" class=\"markedContent\"><\/span><span id=\"page64R_mcid2\" class=\"markedContent\"><br role=\"presentation\" \/><\/span><span id=\"page64R_mcid3\" class=\"markedContent\"> <span dir=\"ltr\" role=\"presentation\">kubectl<\/span><\/span><span id=\"page64R_mcid4\" class=\"markedContent\"> <span dir=\"ltr\" role=\"presentation\">rollout status deployment\/<\/span><\/span><span id=\"page64R_mcid5\" class=\"markedContent\"><span dir=\"ltr\" role=\"presentation\">myapp<\/span><\/span><span id=\"page64R_mcid6\" class=\"markedContent\"><span dir=\"ltr\" role=\"presentation\">-<\/span><\/span><span id=\"page64R_mcid7\" class=\"markedContent\"><span dir=\"ltr\" role=\"presentation\">deployment<\/span><\/span><span id=\"page64R_mcid8\" class=\"markedContent\"><\/span><span id=\"page64R_mcid9\" class=\"markedContent\"> (know the status of the rolling update)<br role=\"presentation\" \/><\/span><span id=\"page64R_mcid10\" class=\"markedContent\"> <span dir=\"ltr\" role=\"presentation\">kubectl<\/span><\/span><span id=\"page64R_mcid11\" class=\"markedContent\"> <span dir=\"ltr\" role=\"presentation\">rollout history deployment\/<\/span><\/span><span id=\"page64R_mcid12\" class=\"markedContent\"><span dir=\"ltr\" role=\"presentation\">myapp<\/span><\/span><span id=\"page64R_mcid13\" class=\"markedContent\"><span dir=\"ltr\" role=\"presentation\">-<\/span><\/span><span id=\"page64R_mcid14\" class=\"markedContent\"><span dir=\"ltr\" role=\"presentation\">deployment<\/span><\/span><span id=\"page64R_mcid15\" class=\"markedContent\"><\/span><span id=\"page64R_mcid16\" class=\"markedContent\"> (know histroy revisions to apply a rollout undo with a specific revision)<br role=\"presentation\" \/><\/span><span id=\"page64R_mcid17\" class=\"markedContent\"> <span dir=\"ltr\" role=\"presentation\">kubectl<\/span><\/span><span id=\"page64R_mcid18\" class=\"markedContent\"> <span dir=\"ltr\" role=\"presentation\">create<\/span><\/span><span id=\"page64R_mcid19\" class=\"markedContent\"> <span dir=\"ltr\" role=\"presentation\">\u2013<\/span><\/span><span id=\"page64R_mcid20\" class=\"markedContent\"><span dir=\"ltr\" role=\"presentation\">f deployment<\/span><\/span><span id=\"page64R_mcid21\" class=\"markedContent\"><span dir=\"ltr\" role=\"presentation\">-<\/span><\/span><span id=\"page64R_mcid22\" class=\"markedContent\"><span dir=\"ltr\" role=\"presentation\">definition.yml<\/span><\/span><span id=\"page64R_mcid23\" class=\"markedContent\"><\/span><span id=\"page64R_mcid24\" class=\"markedContent\"><br role=\"presentation\" \/><\/span><span id=\"page64R_mcid25\" class=\"markedContent\"><span dir=\"ltr\" role=\"presentation\">kubectl<\/span><\/span><span id=\"page64R_mcid26\" class=\"markedContent\"> <span dir=\"ltr\" role=\"presentation\">get deployments<\/span><\/span><span id=\"page64R_mcid27\" class=\"markedContent\"><\/span><span id=\"page64R_mcid28\" class=\"markedContent\"><br role=\"presentation\" \/><\/span><span id=\"page64R_mcid29\" class=\"markedContent\"> <span dir=\"ltr\" role=\"presentation\">kubectl<\/span><\/span><span id=\"page64R_mcid30\" class=\"markedContent\"> <span dir=\"ltr\" role=\"presentation\">apply<\/span><\/span><span id=\"page64R_mcid31\" class=\"markedContent\"> <span dir=\"ltr\" role=\"presentation\">\u2013<\/span><\/span><span id=\"page64R_mcid32\" class=\"markedContent\"><span dir=\"ltr\" role=\"presentation\">f deployment<\/span><\/span><span id=\"page64R_mcid33\" class=\"markedContent\"><span dir=\"ltr\" role=\"presentation\">-<\/span><\/span><span id=\"page64R_mcid34\" class=\"markedContent\"><span dir=\"ltr\" role=\"presentation\">definition.yml<\/span><\/span><span id=\"page64R_mcid35\" class=\"markedContent\"><\/span><span id=\"page64R_mcid36\" class=\"markedContent\"><br role=\"presentation\" \/><\/span><span id=\"page64R_mcid37\" class=\"markedContent\"> <span dir=\"ltr\" role=\"presentation\">kubectl<\/span><\/span><span id=\"page64R_mcid38\" class=\"markedContent\"> <span dir=\"ltr\" role=\"presentation\">set image deployment.apps\/<\/span><\/span><span id=\"page64R_mcid41\" class=\"markedContent\"><span dir=\"ltr\" role=\"presentation\">deployment-name<\/span><\/span><span id=\"page64R_mcid42\" class=\"markedContent\"> <span dir=\"ltr\" role=\"presentation\">container-name<\/span><\/span><span id=\"page64R_mcid43\" class=\"markedContent\"><span dir=\"ltr\" role=\"presentation\">=new-image-name<\/span><\/span><span id=\"page64R_mcid44\" class=\"markedContent\"><\/span><span id=\"page64R_mcid45\" class=\"markedContent\"><br role=\"presentation\" \/><\/span><span id=\"page64R_mcid46\" class=\"markedContent\"> <span dir=\"ltr\" role=\"presentation\">kubectl<\/span><\/span><span id=\"page64R_mcid47\" class=\"markedContent\"> <span dir=\"ltr\" role=\"presentation\">rollout undo deployment\/<\/span><\/span><span id=\"page64R_mcid48\" class=\"markedContent\"><span dir=\"ltr\" role=\"presentation\">myapp<\/span><\/span><span id=\"page64R_mcid49\" class=\"markedContent\"><span dir=\"ltr\" role=\"presentation\">-<\/span><\/span><span id=\"page64R_mcid50\" class=\"markedContent\"><span dir=\"ltr\" role=\"presentation\">deployment (undo to a specific revision:<code class=\"highlighter-rouge\">kubectl rollout undo deployment.apps\/demo-app --to-revision=2<\/code>)<br \/>\n<\/span><\/span><\/p>\n<p>&nbsp;<\/p><\/blockquote>\n<h2 id=\"Configure Applications\"><a title=\"Summary\" href=\"#Summary\">Configure Applications<\/a><\/h2>\n<p>Configure application need to understand : configuring\u00a0 command and arguments on applications, Environnement variables and secrets<\/p>\n<p>Configure command are in docker files or pod definition :<\/p>\n<blockquote>\n<pre>docker file :\r\nfrom Ubuntu\r\nCMD sleep 5\r\ncommands:\r\ndocker build -t ubuntu-sleeper\r\ndocker run ubuntu-sleeper\r\n\r\nCMD command param1 : CMD sleep 5\r\nCMD[\"command\",\"param1\"] : CMD[\"sleep\",\"5\"]\r\n\r\nThe parameter '5' is hard coded, if we want to run a container and changing parameters during pod running like docker run ubuntu-sleeper 10 (argument)\r\n\r\ndocker file with cmd as argument:\r\nFROM Ubuntu\r\nENTRYPOINT[\"sleep\"]\r\nCMD[\"5\"]\r\n\r\ncommands with the file over :\r\ndocker run --name ubuntu-sleeper ubuntu-sleeper 10 or docker run --entrypoint sleep2.0 ubuntu-sleeper 10<\/pre>\n<\/blockquote>\n<p>Pod definition : 'command' replace 'ENTRYPOINT in a docker file and args the CMD in a docker file. the file is the equivalent of 'docker run --entrypoint sleep2.0 ubuntu-sleeper 10'<\/p>\n<blockquote>\n<pre><code class=\"language-yaml\" data-lang=\"yaml\">apiVersion: v1\r\nkind: Pod\r\nmetadata:\r\n  name: ubuntu-sleeper-pod\r\nspec:\r\n  containers:\r\n  - name: ubuntu-sleeper\r\n    image: ubuntu-sleeper\r\n    command: [\"sleep2.0\"]\r\n    args: [\"10\"]<\/code><\/pre>\n<\/blockquote>\n<p>&nbsp;<\/p>\n<p>For configuration of variables env, there is various methodes :<\/p>\n<blockquote>\n<pre>- <strong>Key value method<\/strong> :<\/pre>\n<pre tabindex=\"0\"><code class=\"language-yaml\" data-lang=\"yaml\">apiVersion: v1\r\nkind: Pod\r\nmetadata:\r\n  name: envar-demo\r\n  labels:\r\n    purpose: demonstrate-envars\r\nspec:\r\n  containers:\r\n  - name: envar-demo-container\r\n    image: gcr.io\/google-samples\/node-hello:1.0\r\n    env:\r\n    - name: DEMO_GREETING\r\n      value: \"Hello from the environment\"\r\n    - name: DEMO_FAREWELL\r\n      value: \"Such a sweet sorrow\"<\/code><\/pre>\n<pre tabindex=\"0\">- <strong>ConfigMapkeyref method<\/strong>\r\n\r\n<code class=\"language-yaml\" data-lang=\"yaml\">apiVersion: v1\r\nkind: Pod\r\nmetadata:\r\n  name: envar-demo\r\n  labels:\r\n    purpose: demonstrate-envars\r\nspec:\r\n  containers:\r\n  - name: envar-demo-container\r\n    image: gcr.io\/google-samples\/node-hello:1.0\r\n    env:\r\n    - name: DEMO_GREETING\r\n      valueFrom:\r\n          configMapKeyRef:<\/code> - <strong>SecretKeyRef method<\/strong> <code class=\"language-yaml\" data-lang=\"yaml\">apiVersion: v1\r\nkind: Pod\r\nmetadata:\r\n  name: envar-demo\r\n  labels:\r\n    purpose: demonstrate-envars\r\nspec:\r\n  containers:\r\n  - name: envar-demo-container\r\n    image: gcr.io\/google-samples\/node-hello:1.0\r\n    env:\r\n    - name: DEMO_GREETING\r\n      valueFrom:\r\n          secretKeyRef:<\/code><\/pre>\n<\/blockquote>\n<p><strong>Details of ConfigMaps<\/strong>:<\/p>\n<p>when we have a lot of env variables, it's important to use configMaps :<\/p>\n<p>create a configMap imperative:<\/p>\n<blockquote>\n<pre>kubectl create configmap \\  name-configmap --from-literal=APP_COLOR_KEY=blue_value\r\n\r\nkubectl create configmap \\ \r\n  name-configmap --from-file=appconfig.properties<\/pre>\n<\/blockquote>\n<p>or declarative:<\/p>\n<blockquote>\n<pre tabindex=\"0\"><code class=\"language-yaml\" data-lang=\"yaml\">apiVersion: v1\r\nkind: ConfigMap\r\nmetadata:\r\n  name: game-demo\r\ndata:\r\n  # property-like keys; each key maps to a simple value\r\n  player_initial_lives: \"3\"\r\n  ui_properties_file_name: \"user-interface.properties\"<\/code><\/pre>\n<pre>kubectl create -f config-map.yaml\r\nkubectl get configmaps\r\n\r\nto inject config map into a pod:<\/pre>\n<pre><code class=\"language-yaml\" data-lang=\"yaml\">apiVersion: v1\r\nkind: Pod\r\nmetadata:\r\n  name: envar-demo\r\n  labels:\r\n    purpose: demonstrate-envars\r\nspec:\r\n  containers:\r\n  - name: envar-demo-container\r\n    image: gcr.io\/google-samples\/node-hello:1.0\r\n    <strong>envFrom:\r\n    - configMapKeyRef:\r\n          name: app-configmap<\/strong><\/code><\/pre>\n<\/blockquote>\n<p>&nbsp;<\/p>\n<p>there is also many method to inject configmap into a pod definitoon yaml plus envForm:<\/p>\n<p>Single env :<\/p>\n<blockquote>\n<pre><code class=\"language-yaml\" data-lang=\"yaml\">env:<\/code><code class=\"language-yaml\" data-lang=\"yaml\">\r\n- name: DEMO_GREETING<\/code><code class=\"language-yaml\" data-lang=\"yaml\">\r\n  valueFrom:\r\n        configMapKeyRef:\r\n           name: app-config\r\n           key: APP_COLOR<\/code><\/pre>\n<\/blockquote>\n<p>Volume:<\/p>\n<blockquote>\n<pre><code class=\"language-yaml\" data-lang=\"yaml\">volumes:\r\n<\/code>- name: app-config-volume configMap: name: app-config<code class=\"language-yaml\" data-lang=\"yaml\">\r\n<\/code><\/pre>\n<\/blockquote>\n<p><strong>Details of Secrets method<\/strong>:<\/p>\n<p>- Create a secret imperative:<\/p>\n<pre>kubectl create secret \\ \r\nname-secret --from-literal=DB_HOSTY=mysql \\\r\n            --from-literal=DB_User=root\r\n            --from-literal=DB_Password=passwrd\r\nor\r\n\r\nkubectl create secret \\ \r\nname-secret --from-file=appsecret.properties<\/pre>\n<p>- Create a secret declarative<\/p>\n<blockquote>\n<pre><code class=\"language-yaml\" data-lang=\"yaml\">apiVersion: v1\r\nkind: secret\r\nmetadata:\r\n  name: app-secret\r\ndata:\r\n  DB_Host: mysql\r\n  DB_User: root\r\n  DB_Password: passwrd<\/code><\/pre>\n<\/blockquote>\n<p>kubectl create -f secret-data.yaml<\/p>\n<p>kubectl get secrets<\/p>\n<pre>to inject secret created before into a pod:<\/pre>\n<pre><code class=\"language-yaml\" data-lang=\"yaml\">apiVersion: v1\r\nkind: Pod\r\nmetadata:\r\n  name: envar-demo\r\n  labels:\r\n    purpose: demonstrate-envars\r\nspec:\r\n  containers:\r\n  - name: envar-demo-container\r\n    image: gcr.io\/google-samples\/node-hello:1.0\r\n    <strong>envFrom:\r\n    - secretRef:\r\n          name: app-secret<\/strong><\/code><\/pre>\n<p>There is also many method to inject secrets into a pod definition yaml rather than envForm:<\/p>\n<p>Single env :<\/p>\n<blockquote>\n<pre><code class=\"language-yaml\" data-lang=\"yaml\">env:<\/code><code class=\"language-yaml\" data-lang=\"yaml\">\r\n- name: DB_PASSWORD<\/code><code class=\"language-yaml\" data-lang=\"yaml\">\r\n  valueFrom:\r\n        secretKeyRef:\r\n           name: app-secret\r\n           key: DB_Password<\/code><\/pre>\n<\/blockquote>\n<p>Volume:<\/p>\n<blockquote>\n<pre><code class=\"language-yaml\" data-lang=\"yaml\">volumes:\r\n<\/code>- name: app-secret-volume secret: secretName: app-secret<\/pre>\n<\/blockquote>\n<p>To check volumes inside container : ls \/opt\/app-secret-volumes or cat \/opt\/app-secret-volumes\/DB_Password<\/p>\n<p>Secret are not encrypted in\u00a0 etcd<\/p>\n<p>Don't forget to consider secrets providers : Vault Provider (https:\/\/www.vaultproject.io\/), AWS Provider....<\/p>\n<h2 id=\"Scale Applications\"><a title=\"Summary\" href=\"#Summary\">Scale Applications<\/a><\/h2>\n<p>Scale application with creating other containers by changing or yaml file, we can use multi-container or sidecar when we need an agent :<\/p>\n<blockquote>\n<pre><span id=\"page404R_mcid7\" class=\"markedContent\"><span dir=\"ltr\" role=\"presentation\">apiVersion<\/span><\/span><span id=\"page404R_mcid8\" class=\"markedContent\"><span dir=\"ltr\" role=\"presentation\">:<\/span><\/span><span id=\"page404R_mcid9\" class=\"markedContent\"> <span dir=\"ltr\" role=\"presentation\">v1<\/span><\/span><span id=\"page404R_mcid10\" class=\"markedContent\"><br role=\"presentation\" \/><span dir=\"ltr\" role=\"presentation\">kind:<\/span><\/span><span id=\"page404R_mcid11\" class=\"markedContent\"> <span dir=\"ltr\" role=\"presentation\">Pod<\/span><\/span><span id=\"page404R_mcid12\" class=\"markedContent\"><br role=\"presentation\" \/><span dir=\"ltr\" role=\"presentation\">metadata:<\/span><\/span><span id=\"page404R_mcid13\" class=\"markedContent\"><br role=\"presentation\" \/><span dir=\"ltr\" role=\"presentation\">\u00a0 name:<\/span><\/span><span id=\"page404R_mcid14\" class=\"markedContent\"> <span dir=\"ltr\" role=\"presentation\">simple<\/span><\/span><span id=\"page404R_mcid15\" class=\"markedContent\"><span dir=\"ltr\" role=\"presentation\">-<\/span><\/span><span id=\"page404R_mcid16\" class=\"markedContent\"><span dir=\"ltr\" role=\"presentation\">webapp<\/span><\/span><span id=\"page404R_mcid17\" class=\"markedContent\"><br role=\"presentation\" \/><span dir=\"ltr\" role=\"presentation\">\u00a0 labels:<\/span><\/span><span id=\"page404R_mcid18\" class=\"markedContent\"><br role=\"presentation\" \/><span dir=\"ltr\" role=\"presentation\">\u00a0\u00a0\u00a0\u00a0\u00a0 name:<\/span><\/span><span id=\"page404R_mcid19\" class=\"markedContent\"> <span dir=\"ltr\" role=\"presentation\">simple<\/span><\/span><span id=\"page404R_mcid20\" class=\"markedContent\"><span dir=\"ltr\" role=\"presentation\">-<\/span><\/span><span id=\"page404R_mcid21\" class=\"markedContent\"><span dir=\"ltr\" role=\"presentation\">webapp<\/span><\/span><span id=\"page404R_mcid22\" class=\"markedContent\"><br role=\"presentation\" \/><span dir=\"ltr\" role=\"presentation\">spec:<\/span><\/span><span id=\"page404R_mcid23\" class=\"markedContent\"><br role=\"presentation\" \/><span dir=\"ltr\" role=\"presentation\">\u00a0\u00a0\u00a0 containers:<\/span><\/span><span id=\"page404R_mcid24\" class=\"markedContent\"><br role=\"presentation\" \/><span dir=\"ltr\" role=\"presentation\">\u00a0\u00a0\u00a0 -<\/span><\/span><span id=\"page404R_mcid25\" class=\"markedContent\"> <span dir=\"ltr\" role=\"presentation\">name:<\/span><\/span><span id=\"page404R_mcid26\" class=\"markedContent\"> <span dir=\"ltr\" role=\"presentation\">simple<\/span><\/span><span id=\"page404R_mcid27\" class=\"markedContent\"><span dir=\"ltr\" role=\"presentation\">-<\/span><\/span><span id=\"page404R_mcid28\" class=\"markedContent\"><span dir=\"ltr\" role=\"presentation\">webapp<\/span><\/span><span id=\"page404R_mcid29\" class=\"markedContent\"><br role=\"presentation\" \/><span dir=\"ltr\" role=\"presentation\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 image:<\/span><\/span><span id=\"page404R_mcid30\" class=\"markedContent\"> <span dir=\"ltr\" role=\"presentation\">simple<\/span><\/span><span id=\"page404R_mcid31\" class=\"markedContent\"><span dir=\"ltr\" role=\"presentation\">-<\/span><\/span><span id=\"page404R_mcid32\" class=\"markedContent\"><span dir=\"ltr\" role=\"presentation\">webapp<\/span><\/span><span id=\"page404R_mcid33\" class=\"markedContent\"><br role=\"presentation\" \/><span dir=\"ltr\" role=\"presentation\">\u00a0\u00a0\u00a0\u00a0 ports:<\/span><\/span><span id=\"page404R_mcid34\" class=\"markedContent\"><br role=\"presentation\" \/><span dir=\"ltr\" role=\"presentation\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 -<\/span><\/span><span id=\"page404R_mcid35\" class=\"markedContent\"> <span dir=\"ltr\" role=\"presentation\">containerPort<\/span><\/span><span id=\"page404R_mcid36\" class=\"markedContent\"><span dir=\"ltr\" role=\"presentation\">:<\/span><\/span><span id=\"page404R_mcid37\" class=\"markedContent\"> <span dir=\"ltr\" role=\"presentation\">8080<\/span><\/span><span id=\"page404R_mcid38\" class=\"markedContent\"><\/span><span id=\"page404R_mcid39\" class=\"markedContent\"><\/span><span id=\"page404R_mcid42\" class=\"markedContent\"><br role=\"presentation\" \/><span dir=\"ltr\" role=\"presentation\">\u00a0 -<\/span><\/span><span id=\"page404R_mcid43\" class=\"markedContent\"> <span dir=\"ltr\" role=\"presentation\">name:<\/span><\/span><span id=\"page404R_mcid44\" class=\"markedContent\"> <span dir=\"ltr\" role=\"presentation\">log<\/span><\/span><span id=\"page404R_mcid45\" class=\"markedContent\"><span dir=\"ltr\" role=\"presentation\">-<\/span><\/span><span id=\"page404R_mcid46\" class=\"markedContent\"><span dir=\"ltr\" role=\"presentation\">agent<\/span><\/span><span id=\"page404R_mcid47\" class=\"markedContent\"><br role=\"presentation\" \/><span dir=\"ltr\" role=\"presentation\">\u00a0\u00a0\u00a0 image:<\/span><\/span><span id=\"page404R_mcid48\" class=\"markedContent\"> <span dir=\"ltr\" role=\"presentation\">log<\/span><\/span><span id=\"page404R_mcid49\" class=\"markedContent\"><span dir=\"ltr\" role=\"presentation\">-<\/span><\/span><span id=\"page404R_mcid50\" class=\"markedContent\"><span dir=\"ltr\" role=\"presentation\">agent<\/span><\/span><\/pre>\n<\/blockquote>\n<p>There are tree pattern for multi-container Pods : SideCar, Adapter and Ambassador<\/p>\n<p>at times you may want to run a process that runs to completion in a container. For example a process that pulls a code or binary from a repository that will be used by the main web application. That is a task that will be run only\u00a0 one time when the pod is first created. Or a process that waits\u00a0 for an external service or database to be up before the actual application starts. That's where <strong>initContainers <\/strong>comes in, for more information :<\/p>\n<p>https:\/\/kubernetes.io\/docs\/concepts\/workloads\/pods\/init-containers\/<\/p>\n<h2 id=\"Self-Healing Application\"><a title=\"Summary\" href=\"#Summary\">Self-Healing Application<\/a><\/h2>\n<p>For self healing application, two concept are used : through Liveness and Readiness Probes<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Application Lifecycle Management Summary \u00a0Rolling Updates and Rollbacks in Deployments \u00a0Configure Applications \u00a0Scale Applications \u00a0Self-Healing Application Rolling Updates and Rollbacks in Deployments Deployment strategy: there is two strategies Recreate : delete all pods and create new pods ==&gt; unavailability of applications spec: strategy: type: Recreate Rolling Update : delete and create pods one by one or 2 by 2 &#8230; (default strategy in K8S) spec: strategy: type: RollingUpdate rollingUpdate: maxUnavailable: 0 maxSurge: 1 Summarize Commands kubectl rollout status deployment\/myapp-deployment (know the status of the rolling update) kubectl rollout history deployment\/myapp-deployment (know histroy revisions to apply a rollout undo with a\u2026<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":""},"categories":[12],"tags":[],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":5}},"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"admin","author_link":"https:\/\/devopsopen.com\/index.php\/author\/admin_bak\/"},"uagb_comment_info":6,"uagb_excerpt":"Application Lifecycle Management Summary \u00a0Rolling Updates and Rollbacks in Deployments \u00a0Configure Applications \u00a0Scale Applications \u00a0Self-Healing Application Rolling Updates and Rollbacks in Deployments Deployment strategy: there is two strategies Recreate : delete all pods and create new pods ==&gt; unavailability of applications spec: strategy: type: Recreate Rolling Update : delete and create pods one by one&hellip;","_links":{"self":[{"href":"https:\/\/devopsopen.com\/index.php\/wp-json\/wp\/v2\/posts\/125"}],"collection":[{"href":"https:\/\/devopsopen.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devopsopen.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devopsopen.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/devopsopen.com\/index.php\/wp-json\/wp\/v2\/comments?post=125"}],"version-history":[{"count":7,"href":"https:\/\/devopsopen.com\/index.php\/wp-json\/wp\/v2\/posts\/125\/revisions"}],"predecessor-version":[{"id":132,"href":"https:\/\/devopsopen.com\/index.php\/wp-json\/wp\/v2\/posts\/125\/revisions\/132"}],"wp:attachment":[{"href":"https:\/\/devopsopen.com\/index.php\/wp-json\/wp\/v2\/media?parent=125"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devopsopen.com\/index.php\/wp-json\/wp\/v2\/categories?post=125"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devopsopen.com\/index.php\/wp-json\/wp\/v2\/tags?post=125"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}