<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Mastery of Application Updates Rollbacks]]></title><description><![CDATA[Mastery of Application Updates Rollbacks]]></description><link>https://masteryapplicationupdatesrollbacks.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Mon, 31 Aug 2026 08:49:44 GMT</lastBuildDate><atom:link href="https://masteryapplicationupdatesrollbacks.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Mastery of Application Updates and Rollbacks Lab]]></title><description><![CDATA[Objectives:

Manage application updates smoothly.

Rollback failed deployments to ensure service continuity.

Understand and manage image streams and use triggers for automatic updates.


Task 1: Update an Application and Monitor the Rollout Status
O...]]></description><link>https://masteryapplicationupdatesrollbacks.hashnode.dev/mastery-of-application-updates-and-rollbacks-lab</link><guid isPermaLink="true">https://masteryapplicationupdatesrollbacks.hashnode.dev/mastery-of-application-updates-and-rollbacks-lab</guid><dc:creator><![CDATA[Hamza Afzal]]></dc:creator><pubDate>Sat, 30 Nov 2024 21:01:19 GMT</pubDate><content:encoded><![CDATA[<p><strong>Objectives:</strong></p>
<ul>
<li><p>Manage application updates smoothly.</p>
</li>
<li><p>Rollback failed deployments to ensure service continuity.</p>
</li>
<li><p>Understand and manage image streams and use triggers for automatic updates.</p>
</li>
</ul>
<h3 id="heading-task-1-update-an-application-and-monitor-the-rollout-status">Task 1: Update an Application and Monitor the Rollout Status</h3>
<p><strong>Objective:</strong> Demonstrate the process of updating an application and monitoring the rollout status.</p>
<p><strong>Explanation:</strong> Regularly updating applications is crucial for incorporating new features, bug fixes, and security patches. Monitoring the rollout status helps ensure a smooth and controlled update process</p>
<p>Create a deployment config file name it task1.yaml:</p>
<pre><code class="lang-bash">apiVersion: apps/v1  
kind: Deployment
metadata:
  name: myapp-deployment
  namespace: labs
  labels:
    app: myapp
spec:  
  replicas: 2  
  selector:
    matchLabels:
      app: myapp
      <span class="hljs-built_in">type</span>: front-end
  template:
    metadata:
      labels:
        app: myapp
        <span class="hljs-built_in">type</span>: front-end
    spec: 
      containers:
      - name: my-container
        image: nginx:1.71 <span class="hljs-comment"># choose one that is not deprecated version of nginx</span>
</code></pre>
<pre><code class="lang-bash">oc create -f task1.yaml
</code></pre>
<p>To update the application using a new container image:</p>
<pre><code class="lang-bash">oc <span class="hljs-built_in">set</span> image deployment/myapp-deployment my-container=nginx:latest
</code></pre>
<p>You can monitor the roll-out status too:</p>
<pre><code class="lang-bash">oc rollout status deployment myapp-deployment
</code></pre>
<h3 id="heading-task-2-simulate-a-failed-deployment-and-perform-a-rollback">Task 2: Simulate a Failed Deployment and Perform a Rollback</h3>
<p><strong>Objective:</strong> Illustrate the simulation of a failed deployment and the subsequent rollback process.</p>
<p><strong>Explanation:</strong> Simulating a failed deployment allows participants to practice rollback procedures, ensuring that, in a real-world scenario, service continuity can be quickly restored in case of issues.</p>
<pre><code class="lang-bash"><span class="hljs-comment"># Simulating a failed deployment (incorrect image)</span>
oc <span class="hljs-built_in">set</span> image deployment/myapp-deployment my-container=nginx:5
</code></pre>
<p>If you see any problem with the application, you would want to roll back to the previous or stable version:</p>
<pre><code class="lang-bash">oc rollout undo deployment/myapp-deployment
</code></pre>
<h3 id="heading-task-3-create-and-manage-an-image-stream-and-set-up-triggers-for-automated-deployments">Task 3: Create and Manage an Image Stream and Set Up Triggers for Automated Deployments</h3>
<p><strong>Objective:</strong> Demonstrate the creation and management of an ImageStream and the setup of triggers for automated deployments.</p>
<p><strong>Explanation:</strong> ImageStreams help manage the flow of container images within OpenShift, allowing for versioning and control. Triggers automate the deployment process based on changes to the associated image.</p>
<p>Create a task3.yaml:</p>
<pre><code class="lang-bash">apiVersion: image.openshift.io/v1
kind: ImageStream
metadata:
  name: my-app-image-stream
spec:
  tags:
  - name: latest
    from:
      kind: DockerImage
      name: quay.io/redhattraining/hello-world-nginx:v1.0
    importPolicy:
      scheduled: <span class="hljs-literal">true</span>
</code></pre>
<pre><code class="lang-bash">oc create -f task3.yaml
</code></pre>
]]></content:encoded></item></channel></rss>