Skip to content

Commit

Permalink
kubernetes-resume-challenge
Browse files Browse the repository at this point in the history
  • Loading branch information
TomiwaAribisala-git committed Mar 21, 2024
1 parent 361c619 commit f1466df
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
context: .
file: Dockerfile
push: false
tags: ecom-web:v1
tags: ecom-web:v2

- name: Login to Docker Hub
uses: docker/login-action@v2
Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,12 @@ docker run -d —network some-network —name ecom-web -p 8080:80 ecom-web:v1

- Observing the deployment scaling up with `kubectl get pods`

![kubectl get pods](./images/scale-pods.png)
![kubectl get pods](./images/scale-pods.png)

## Performing a Rolling Update
- Modified [web application’s code](./app/index.php) to include promotional banner
- Built a updated Docker image--`tomiwa97/ecom-web:v2` and pushed to DockerHub
- Updated `ecom-web.yaml` with the new image version
- Outcome: `kubectl rollout status deployment/ecom-web`

![Rollout-Update](rollout.png)
14 changes: 13 additions & 1 deletion app/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,19 @@
</div>
</section>


<!--==========Promotional Banner==========-->
<div class="banner">
<div class="banner__content">
<div class="banner__text">
<strong>Enjoy Exclusive Discounts and Vouchers on Our New Laptops and VR Devices</strong>
</div>
<button class="banner__close" type="button">
<span class="material-icons">
close
</span>
</button>
</div>
</div>
<footer class="footer_area row">
<div class="container custom-container">

Expand Down
2 changes: 1 addition & 1 deletion kubernetes/ecom-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
- name: regcred
containers:
- name: ecom-web
image: tomiwa97/ecom-web:v1
image: tomiwa97/ecom-web:v2
imagePullPolicy: Always
ports:
- containerPort: 80
Expand Down

0 comments on commit f1466df

Please sign in to comment.