← Back to list

Day 29: Azure ACR, Git Cherry-Pick, AWS ECR, a Kubernetes Job Template & a Time-Check Pod

Day 29 covered five tasks across Azure, Git, AWS and Kubernetes, with a recurring theme of building and pushing Docker images to cloud…

Winjoyntinyari · 2026-06-16 11:26 · 0 claps · 5.0 min read
#100daysofdevops #kodekloud #aws-ecr #git-cherry-pick #azure-acr
Open on Medium ↗
Wiki topics: ☁️ · DevOps & Cloud

Day 29: Azure ACR, Git Cherry-Pick, AWS ECR, a Kubernetes Job Template & a Time-Check Pod

Photo by Kelli McClintock on Unsplash

Photo by Kelli McClintock on Unsplash

Day 29 covered five tasks across Azure, Git, AWS and Kubernetes, with a recurring theme of building and pushing Docker images to cloud registries. Here’s the full breakdown.

Task 1: Building and Pushing a Docker Image to Azure Container Registry

What the challenge was

Create an Azure Container Registry with the Basic pricing plan in East US, then build a Docker image from a Dockerfile on the azure-client host and push it to the registry with the tag latest.

What I did

In the Azure Portal I navigated to Container Registries and provisioned a new registry named xfusionacr7238 in the East US location, setting the pricing plan to Basic.

On the azure-client host I authenticated with Azure and linked the local Docker daemon to the registry:

az login
az acr login --name xfusionacr7238

Navigated into the application directory and built the image, tagging it directly with the registry’s login server URI:

cd /root/pyapp
docker build -t xfusionacr7238.azurecr.io/xfusionacr7238:latest .

Pushed the image to the registry:

docker push xfusionacr7238.azurecr.io/xfusionacr7238:latest

Result

The ACR repository was created with the Basic plan and the Docker image was built and pushed successfully under the latest tag.

Task 2: Cherry-Picking a Commit from Feature into Master

What the challenge was

In the /usr/src/kodekloudrepos/beta repository, cherry-pick the specific commit with the message Update info.txt from the feature branch into master, without merging the rest of the in-progress work, then push the changes.

What I did

Navigated to the repository and added it as a safe directory to bypass Git’s ownership restrictions:

cd /usr/src/kodekloudrepos/beta
git config --global --add safe.directory /usr/src/kodekloudrepos/beta

Inspected the commit history on the feature branch to find the right commit hash:

git log feature --oneline

Switched to master and cherry-picked just that commit:

git checkout master
git config --global --add safe.directory /usr/src/kodekloudrepos/beta
git cherry-pick <COMMIT_HASH>

Pushed the updated master branch and verified the result:

git push origin master
git log -n 1

Result

Only the targeted commit was merged into master, leaving the rest of the in-progress feature work untouched, and the change was pushed successfully.

Task 3: Building and Pushing a Docker Image to AWS ECR

What the challenge was

Create a private ECR repository named devops-ecr, build a Docker image from a Dockerfile on the aws-client host and push it to the repository with the tag latest.

What I did

In the AWS Console I navigated to the ECR dashboard and created a new private repository named devops-ecr.

On the aws-client host I authenticated Docker against the ECR registry:

aws ecr get-login-password | docker login --username AWS --password-stdin <aws_account_id>.dkr.ecr.<aws_region>.amazonaws.com

Built the image from the Dockerfile:

cd /root/pyapp
docker build -t devops-ecr .

Tagged the image to match the ECR repository URI and pushed it:

docker tag devops-ecr:latest <aws_account_id>.dkr.ecr.<aws_region>.amazonaws.com/devops-ecr:latest
docker push <aws_account_id>.dkr.ecr.<aws_region>.amazonaws.com/devops-ecr:latest

Result

The private ECR repository was created and the Docker image was built, tagged and pushed successfully under the latest tag.

Task 4: Creating Another Kubernetes Job Template

What the challenge was

Create a Job named countdown-xfusion with a pod template named countdown-xfusion and a container named container-countdown-xfusion, using the ubuntu:latest image, running sleep 5, with restartPolicy: Never.

What I did

Created the manifest file:

vim job.yaml
apiVersion: batch/v1
kind: Job
metadata:
  name: countdown-xfusion
spec:
  template:
    metadata:
      name: countdown-xfusion
    spec:
      containers:
      - name: container-countdown-xfusion
        image: ubuntu:latest
        command: ["sleep", "5"]
      restartPolicy: Never

Applied the manifest and verified completion:

kubectl apply -f job.yaml
kubectl get pods --selector=job-name=countdown-xfusion

Result

The Job ran successfully and the pod completed cleanly with the correct configuration.

Task 5: Creating a Time-Check Pod with a ConfigMap and Volume

What the challenge was

Create a pod named time-check in the nautilus namespace with a container named time-check using busybox:latest. The container needed to log the current time to a file every TIME_FREQ seconds, where TIME_FREQ came from a ConfigMap, and write the logs to a mounted volume at /opt/dba/time.

What I did

First created the missing namespace:

kubectl create namespace nautilus

Created a manifest file time-check.yaml defining both the ConfigMap and the Pod:

apiVersion: v1
kind: ConfigMap
metadata:
  name: time-config
  namespace: nautilus
data:
  TIME_FREQ: "8"
---
apiVersion: v1
kind: Pod
metadata:
  name: time-check
  namespace: nautilus
spec:
  containers:
  - name: time-check
    image: busybox:latest
    env:
    - name: TIME_FREQ
      valueFrom:
        configMapKeyRef:
          name: time-config
          key: TIME_FREQ
    command: ["/bin/sh", "-c", "while true; do date >> /opt/dba/time/time-check.log; sleep $TIME_FREQ; done"]
    volumeMounts:
    - name: log-volume
      mountPath: /opt/dba/time
  volumes:
  - name: log-volume
    emptyDir: {}

Applied the manifest:

kubectl apply -f time-check.yaml

Verified the logs were writing correctly inside the container:

kubectl exec -n nautilus time-check -- cat /opt/dba/time/time-check.log

Result

The pod ran successfully, pulling TIME_FREQ from the ConfigMap and writing timestamps to the mounted volume at the correct interval.

Day 29 Wrap-Up

Five tasks today with a strong container registry theme running through the first half — both ACR and ECR follow a similar pattern of authenticate, build, tag and push, just with different CLI tooling. The Git cherry-pick task was a good exercise in precision, pulling just one commit across branches without dragging in unrelated in-progress work. The two Kubernetes Job tasks reinforced the same template structure with different images, and the time-check pod tied together ConfigMaps, environment variables and volume mounts in a single manifest.

See you on Day 30.

Full series documented on Medium — all commands, configs and the honest journey.


메타데이터
post_id
f8b27c1a95f3
slug
day-29-azure-acr-git-cherry-pick-aws-ecr-a-kubernetes-job-template-a-time-check-pod-f8b27c1a95f3
url
https://medium.com/@winjoyntinyari765/day-29-azure-acr-git-cherry-pick-aws-ecr-a-kubernetes-job-template-a-time-check-pod-f8b27c1a95f3
canonical_url
https://medium.com/@winjoyntinyari765/day-29-azure-acr-git-cherry-pick-aws-ecr-a-kubernetes-job-template-a-time-check-pod-f8b27c1a95f3
author_url
https://medium.com/@winjoyntinyari765
status
ok
fetched_at
2026-07-07 00:45:30