<?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" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ewuji John on Medium]]></title>
        <description><![CDATA[Stories by Ewuji John on Medium]]></description>
        <link>https://medium.com/@johnseyi51?source=rss-c2e76ee953ff------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*momHkg_qnaBBbQ8C5TKxzw.png</url>
            <title>Stories by Ewuji John on Medium</title>
            <link>https://medium.com/@johnseyi51?source=rss-c2e76ee953ff------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 06:06:21 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@johnseyi51/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Kubernetes CronJobs: How to Save Costs by Running Cron Jobs on Kubernetes Instead of Serverless]]></title>
            <link>https://medium.com/@johnseyi51/kubernetes-cronjobs-how-to-save-costs-by-running-cron-jobs-on-kubernetes-instead-of-serverless-b57ca6a5f7dd?source=rss-c2e76ee953ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/b57ca6a5f7dd</guid>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[kubernetes-cronjob]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[azure-devops]]></category>
            <dc:creator><![CDATA[Ewuji John]]></dc:creator>
            <pubDate>Thu, 19 Mar 2026 14:20:22 GMT</pubDate>
            <atom:updated>2026-03-19T14:29:40.353Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wlI3900wKk4aByt0gNgiFw.png" /></figure><p>A good number of DevOps engineers are familiar with using serverless apps like Function Apps when it comes to running cron jobs.</p><p>I know it can be cost-effective, but knowing you can run the same workload on your existing Kubernetes cluster (at no extra cost) can be a big win for the organization in terms of cost savings.</p><p>In this article, I’ll walk through the steps to deploy a cron job in a Kubernetes cluster.</p><h3>Step 1: Create Your Manifest File (.yaml)</h3><p>The first step is getting your manifest file right.</p><p>Here is a sample manifest you can use effectively:</p><pre>apiVersion: batch/v1<br>kind: CronJob<br>metadata:<br>  name: service-name<br>spec:<br>  schedule: &quot;0 9 * * *&quot;   # Update the cron time to your preferred schedule<br>  concurrencyPolicy: Forbid<br>  successfulJobsHistoryLimit: 3<br>  failedJobsHistoryLimit: 3<br>  jobTemplate:<br>    spec:<br>      ttlSecondsAfterFinished: 3600<br>      template:<br>        metadata:<br>          labels:<br>            app: service-name<br>        spec:<br>          imagePullSecrets:<br>          - name: acr-secret<br>          containers:<br>          - name: service-name<br>            image: &quot;&lt;container-registry.io&gt;/service-name:BuildNumber&quot;<br>            resources:<br>              requests:<br>                memory: &quot;128Mi&quot;<br>                cpu: &quot;100m&quot;<br>              limits:<br>                memory: &quot;256Mi&quot;<br>                cpu: &quot;500m&quot;<br>          restartPolicy: OnFailure</pre><h3>Step 2: Apply the Manifest</h3><p>You can deploy this directly to your Kubernetes cluster using:</p><pre>kubectl apply -f &lt;filename&gt;.yaml</pre><h3>Step 3: Automate with Azure DevOps</h3><p>To automate this process in Azure DevOps, you’ll need to include this in your pipeline.</p><ul><li><strong>Build Pipeline</strong>:<br> This should handle building your container image and pushing it to your container registry.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LdO-93bSgqwWaCNghRRNzg.png" /><figcaption>Azure DevOps Build Pipeline</figcaption></figure><ul><li><strong>Release Pipeline</strong>:<br> This is where you deploy the manifest to your cluster. You can include:</li></ul><pre>kubectl apply -f &lt;filename&gt;.yaml --validate=false</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FMVRpnu4dP82XenwfwS1WQ.png" /><figcaption>Azure DevOps Release Pipeline</figcaption></figure><h3>Step 4: Verify Deployment</h3><p>Once the deployment is successful, you can confirm your cron job is running with:</p><pre>kubectl get cronjob</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t7e26kAjXNhv7KOGqDBajg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b57ca6a5f7dd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DataDog Integration with Kubernetes Cluster]]></title>
            <link>https://medium.com/@johnseyi51/datadog-integration-with-aks-cluster-8d0b1fb84f70?source=rss-c2e76ee953ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d0b1fb84f70</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[datadog]]></category>
            <category><![CDATA[site-reliability-engineer]]></category>
            <category><![CDATA[kubernetes-cluster]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Ewuji John]]></dc:creator>
            <pubDate>Thu, 19 Feb 2026 10:02:26 GMT</pubDate>
            <atom:updated>2026-02-24T17:34:47.234Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3SO-UZuQ9FcGrmJUOm2tjA.png" /></figure><h3>Stage 1: Retrieve Credentials from DataDog</h3><p>Obtain the following credentials from the DataDog platform:</p><ul><li>APP Key</li><li>API Key</li><li>DataDog Site (e.g., us3.datadoghq.com)</li></ul><p>These credentials are required to authenticate and configure the DataDog agent within the cluster.</p><h3>Stage 2: Update the datadog-agent.yaml Configuration</h3><p>Modify the datadog-agent.yaml file either manually or through an automated process, depending on your deployment approach.</p><pre>apiVersion: datadoghq.com/v2alpha1<br>kind: DatadogAgent<br>metadata:<br>  name: datadog<br>  namespace: datadog<br>spec:<br>  global:<br>    site: us3.datadoghq.com<br>    credentials:<br>      apiSecret:<br>        secretName: datadog-secret<br>        keyName: api-key<br><br>  features:<br>    apm:<br>      enabled: true<br><br>    logCollection:<br>      enabled: true<br>      containerCollectAll: true<br><br>    # Disables Kubernetes events<br>    eventCollection:<br>      collectKubernetesEvents: false<br><br>    # Disable Datadog Admission Controller in this installation<br>    admissionController:<br>      enabled: false<br><br>  override:<br>    nodeAgent:<br>      env:<br>        - name: DD_CONTAINER_EXCLUDE_LOGS<br>          value: |-<br>            kube_namespace:^kube-system$<br>            kube_namespace:^datadog$ kube_container_name:^cluster-agent$<br>            kube_namespace:^datadog$ kube_container_name:^cluster-checks-runner$<br>            kube_namespace:^datadog$ kube_container_name:^agent$<br>            image:.*datadog/cluster-agent.*<br>            image:.*datadog/cluster-checks-runner.*<br>            image:.*datadog/agent.*<br><br>    # Optional : Exclude container logs<br>    clusterAgent:<br>      env:<br>        - name: DD_CONTAINER_EXCLUDE_LOGS<br>          value: |-<br>            kube_namespace:^kube-system$<br>            kube_namespace:^datadog$ kube_container_name:^cluster-agent$</pre><p>During this step, you can:</p><ul><li>Define which logs and metrics should be collected</li><li>Configure specific integrations</li><li>Exclude unnecessary logs to optimize performance and reduce noise</li></ul><h3>Stage 3: Execute the Deployment Script</h3><p>Run the provided script to perform the following actions:</p><pre>export DD_API_KEY=xxxx<br>export DD_APP_KEY=xxxx<br><br>echo &quot;Cloning datadog&quot;<br>helm repo add datadog https://helm.datadoghq.com<br>    <br>echo &quot;installing datadog&quot;<br>helm upgrade --install datadog-operator datadog/datadog-operator --namespace datadog --create-namespace <br><br>echo &quot;creating datadog secret&quot;<br>kubectl create secret generic datadog-secret --from-literal api-key=$DD_API_KEY --from-literal app-key=$DD_APP_KEY --namespace datadog<br><br>echo &quot;creating datadog deployment&quot;<br>kubectl apply -f datadog-agent.yaml --namespace datadog </pre><ul><li>Clone the DataDog repository</li><li>Install the DataDog agent</li><li>Create the required Kubernetes secret</li><li>Deploy the DataDog components to the AKS cluster</li></ul><h3>Optional — Stage 4: Automate with Azure DevOps Pipelines</h3><p>To streamline and standardize the deployment process, you can automate the entire setup using Azure DevOps (ADO) Pipelines. This ensures consistency across environments and supports repeatable deployments.</p><pre>ADO Pipeline Task<br><br>Variables<br>    $(subscription_id)<br>    $(aks_rg_name)<br>    $(kubernetes_name)<br><br>- task: AzureCLI@2<br>  displayName: AKS CLI login    <br>  inputs:<br>    azureSubscription: &#39;Hanger-AKS-DEV&#39;<br>    scriptType: &#39;bash&#39;<br>    scriptLocation: &#39;inlineScript&#39;<br>    inlineScript: |<br>      echo &quot;login succesful&quot;<br>            <br>      echo &quot;setting subscription&quot;<br>      az account set --subscription $(subscription_id)<br><br>      echo &quot;Getting AKS Credentials&quot;<br>      az aks get-credentials --resource-group $(aks_rg_name) --name $(kubernetes_name) --overwrite-existing<br><br>      echo &quot;Installing kubelogin&quot;<br>      curl -LO https://github.com/Azure/kubelogin/releases/latest/download/kubelogin-linux-amd64.zip<br>      unzip kubelogin-linux-amd64.zip<br>      sudo mv bin/linux_amd64/kubelogin /usr/local/bin/<br><br>      echo &quot;Converting kubeconfig to use non-interactive login&quot;<br>      kubelogin convert-kubeconfig -l azurecli<br>      <br>      cd into your folder<br>      cat DataDog-deployment-script.sh<br>      ./DataDog-deployment-script.sh</pre><pre>                        +----------------------+<br>                        |      DataDog        |<br>                        |  (us3.datadoghq.com)|<br>                        +----------+-----------+<br>                                   ^<br>                                   | HTTPS (443)<br>                                   |<br>+---------------------------------------------------------------+<br>|                     Azure Subscription                        |<br>|                                                               |<br>|   +------------------+                                        |<br>|   |   AKS Cluster    |                                        |<br>|   |------------------|                                        |<br>|   |                  |                                        |<br>|   |  +------------+  |                                        |<br>|   |  |  Node 1    |  |                                        |<br>|   |  |------------|  |                                        |<br>|   |  | App Pods   |  |                                        |<br>|   |  | Datadog    |--+-----&gt; Sends Logs &amp; Metrics             |<br>|   |  | Agent      |  |                                        |<br>|   |  +------------+  |                                        |<br>|   |                  |                                        |<br>|   |  +------------+  |                                        |<br>|   |  |  Node 2    |  |                                        |<br>|   |  |------------|  |                                        |<br>|   |  | App Pods   |  |                                        |<br>|   |  | Datadog    |--+-----&gt; Sends Logs &amp; Metrics             |<br>|   |  | Agent      |  |                                        |<br>|   |  +------------+  |                                        |<br>|   |                  |                                        |<br>|   +------------------+                                        |<br>|                                                               |<br>+---------------------------------------------------------------+</pre><h4>Flow Explanation</h4><ol><li>Application pods generate logs and metrics.</li><li>The <strong>Datadog Agent (DaemonSet)</strong> runs on every AKS node.</li><li>The agent collects:</li></ol><ul><li>Container logs</li><li>Kubernetes metrics</li><li>Node metrics</li></ul><p>4. Data is securely transmitted via HTTPS (port 443) to DataDog SaaS.</p><h3>Troubleshooting Commands — DataDog (AKS)</h3><p>The following commands can be added as a <strong>Confluence footnote</strong> for quick troubleshooting reference when validating a DataDog deployment in AKS.</p><h3>Validate DataDog Resources</h3><pre>kubectl get all -n datadog</pre><pre>kubectl get pods -n datadog -l agent.datadoghq.com/component=cluster-agent</pre><pre>kubectl get ds -A | grep datadog</pre><pre>kubectl get deployment -n datadog</pre><h3>Required Components Check</h3><p>Ensure the following components are running:</p><ol><li>Datadog Agent (DaemonSet)</li><li>Datadog Cluster Agent (Deployment)</li><li>Datadog Operator</li></ol><h3>Helm Verification</h3><pre>helm list -A | grep datadog</pre><p>Uninstall Operator (if required):</p><pre>helm uninstall datadog-operator -n datadog</pre><h3>Reapply Configuration</h3><pre>kubectl apply -f datadog-agent-full.yaml -n datadog</pre><h3>Cluster Agent Logs (Webhook Troubleshooting)</h3><pre>kubectl logs -n datadog deploy/datadog-cluster-agent --since=10m | grep -i webhook</pre><p><strong>Tip:</strong><br> If agents are not sending metrics/logs, verify:</p><ul><li>API &amp; APP keys are correctly configured in the Kubernetes Secret</li><li>Pods are in Running state</li><li>No outbound firewall restrictions blocking HTTPS (443) traffic to DataDog</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d0b1fb84f70" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kubernetes Private Cluster Ingress Deployment, Configuration Guide & Automation Using Azure DevOps…]]></title>
            <link>https://medium.com/@johnseyi51/kubernetes-private-cluster-ingress-deployment-configuration-guide-automation-using-azure-devops-7dfdf11dd7e0?source=rss-c2e76ee953ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/7dfdf11dd7e0</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[azure-kubernetes-service]]></category>
            <category><![CDATA[ingress]]></category>
            <category><![CDATA[kubernetes-security]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Ewuji John]]></dc:creator>
            <pubDate>Wed, 18 Feb 2026 23:01:59 GMT</pubDate>
            <atom:updated>2026-02-20T18:53:46.347Z</atom:updated>
            <content:encoded><![CDATA[<h3>Kubernetes Private Cluster Ingress Deployment, Configuration Guide &amp; Automation Using Azure DevOps Pipeline</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n8mOdP3C89CP7a9WCBbk_w.png" /></figure><h3>Overview</h3><p>This document describes the process for deploying and configuring the NGINX Ingress Controller within the Kubernetes cluster, and for automating the deployment. The setup is divided into three main stages:</p><ol><li>Ingress Controller Setup</li><li>Ingress Route Configuration</li><li>Using Azure DevOps Pipeline for automation.</li></ol><h3>Stage 1: Ingress Controller Setup</h3><h3>1. Identify Target Environment</h3><p>The first step is to identify the target environment or Kubernetes cluster where the Ingress Controller will be deployed.</p><p>Examples:</p><ul><li>Development Cluster</li><li>Staging Cluster</li><li>Production Cluster</li></ul><p>Ensure:</p><ul><li>The correct Kubernetes context is selected.</li><li>Appropriate access permissions are available.</li><li>The private Azure Container Registry (ACR) is accessible from the cluster.</li></ul><h3>2. Import NGINX Images into Private ACR</h3><p>The required NGINX Ingress images are pulled from a publicly available container registry and pushed into the organization’s private Azure Container Registry (ACR).</p><pre>                        +----------------------------------+<br>                        |  Public Container Registry       |<br>                        |  (NGINX Ingress Images)          |<br>                        +----------------+------------------+<br>                                         |<br>                                         | ingress.sh<br>                                         v<br>                        +----------------------------------+<br>                        |  Azure Container Registry (ACR)  |<br>                        |  (Private Images)                |<br>                        +----------------+------------------+<br>                                         |<br>                                         | Helm (ingress-deployment.sh)<br>                                         v<br>+----------------------------------------------------------------------------------+<br>|                          Kubernetes Cluster (Private Network)                   |<br>|                                                                                  |<br>|   +----------------------+         +--------------------------------------+      |<br>|   | Ingress Controller   |         | Kubernetes Service (Private IP)     |      |<br>|   | Pods (NGINX)         |--------&gt;| Internal Load Balancer              |      |<br>|   +----------------------+         +--------------------------------------+      |<br>|                                                                                  |<br>+----------------------------------------------------------------------------------+</pre><p>This is executed using the script:</p><pre>REGISTRY_NAME=your-registry.azurecr.io<br>SOURCE_REGISTRY=registry.k8s.io<br>CONTROLLER_IMAGE=ingress-nginx/controller<br>CONTROLLER_TAG=v1.8.1<br>PATCH_IMAGE=ingress-nginx/kube-webhook-certgen<br>PATCH_TAG=v20230407<br>DEFAULTBACKEND_IMAGE=defaultbackend-amd64<br>DEFAULTBACKEND_TAG=1.5<br><br>az acr import --name $REGISTRY_NAME --source $SOURCE_REGISTRY/$CONTROLLER_IMAGE:$CONTROLLER_TAG --image $CONTROLLER_IMAGE:$CONTROLLER_TAG<br>az acr import --name $REGISTRY_NAME --source $SOURCE_REGISTRY/$PATCH_IMAGE:$PATCH_TAG --image $PATCH_IMAGE:$PATCH_TAG<br>az acr import --name $REGISTRY_NAME --source $SOURCE_REGISTRY/$DEFAULTBACKEND_IMAGE:$DEFAULTBACKEND_TAG --image $DEFAULTBACKEND_IMAGE:$DEFAULTBACKEND_TAG</pre><p><strong>Purpose</strong></p><ul><li>Ensures all ingress images are stored internally.</li><li>Avoids direct dependency on public registries.</li><li>Improves security and compliance.</li></ul><p>⏱ Estimated duration: A few minutes.</p><h3>3. Deploy the Ingress Controller</h3><p>The Ingress Controller is deployed using Helm commands defined in:</p><pre># Add the ingress-nginx repository<br>helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx<br>helm repo update<br><br># Set variable for ACR location to use for pulling images<br>ACR_LOGIN_SERVER=your-registry.azurecr.io<br>SOURCE_REGISTRY=registry.k8s.io<br>CONTROLLER_IMAGE=ingress-nginx/controller<br>CONTROLLER_TAG=v1.8.1<br>PATCH_IMAGE=ingress-nginx/kube-webhook-certgen<br>PATCH_TAG=v20230407<br>DEFAULTBACKEND_IMAGE=defaultbackend-amd64<br>DEFAULTBACKEND_TAG=1.5<br><br># Use Helm to deploy an NGINX ingress controller with required security policies<br>helm install ingress-nginx ingress-nginx/ingress-nginx \<br>    --version 4.7.1 \<br>    --namespace ingress-main \<br>    --create-namespace \<br>    --set controller.replicaCount=2 \<br>    --set controller.nodeSelector.&quot;kubernetes\.io/os&quot;=linux \<br>    --set controller.image.registry=$ACR_LOGIN_SERVER \<br>    --set controller.image.image=$CONTROLLER_IMAGE \<br>    --set controller.image.tag=$CONTROLLER_TAG \<br>    --set controller.image.digest=&quot;&quot; \<br>    --set controller.admissionWebhooks.patch.nodeSelector.&quot;kubernetes\.io/os&quot;=linux \<br>    --set controller.service.annotations.&quot;service\.beta\.kubernetes\.io/azure-load-balancer-health-probe-request-path&quot;=/healthz \<br>    --set controller.service.externalTrafficPolicy=Local \<br>    --set controller.admissionWebhooks.patch.image.registry=$ACR_LOGIN_SERVER \<br>    --set controller.admissionWebhooks.patch.image.image=$PATCH_IMAGE \<br>    --set controller.admissionWebhooks.patch.image.tag=$PATCH_TAG \<br>    --set controller.admissionWebhooks.patch.image.digest=&quot;&quot; \<br>    --set defaultBackend.nodeSelector.&quot;kubernetes\.io/os&quot;=linux \<br>    --set defaultBackend.image.registry=$ACR_LOGIN_SERVER \<br>    --set defaultBackend.image.image=$DEFAULTBACKEND_IMAGE \<br>    --set defaultBackend.image.tag=$DEFAULTBACKEND_TAG \<br>    --set defaultBackend.image.digest=&quot;&quot; \<br>    `# --- Security Policy Additions Start Here. This is Optional ---` \<br>    --set controller.allowPrivilegeEscalation=false \<br>    --set controller.runAsUser=101 \<br>    --set controller.runAsGroup=101 \<br>    --set controller.containerSecurityContext.allowPrivilegeEscalation=false \<br>    --set controller.containerSecurityContext.readOnlyRootFilesystem=true \<br>    --set controller.containerSecurityContext.runAsNonRoot=true \<br>    --set defaultBackend.runAsUser=101 \<br>    --set defaultBackend.runAsGroup=101 \<br>    --set defaultBackend.containerSecurityContext.allowPrivilegeEscalation=false \<br>    --set defaultBackend.containerSecurityContext.readOnlyRootFilesystem=true \<br>    --set defaultBackend.containerSecurityContext.runAsNonRoot=true \<br>    --set controller.containerSecurityContext.runAsUser=101 \<br>    --set controller.containerSecurityContext.runAsGroup=101 \<br>    --set controller.containerSecurityContext.readOnlyRootFilesystem=false </pre><h4>What This Step Does</h4><ul><li>Pulls ingress images from the private ACR.</li></ul><p><strong>Deploys</strong>:</p><ul><li>Ingress Controller pods</li><li>Associated Kubernetes Service</li><li>Configures the ingress with a <strong>private IP address</strong></li></ul><h4>Important Notes</h4><ul><li>The ingress is configured for <strong>private access only</strong>.</li><li>It is accessible only within the internal network.</li><li>No public exposure is enabled unless explicitly configured.</li></ul><h3>Stage 2: Ingress Route Configuration</h3><p>Once the Ingress Controller is deployed, routing rules must be configured.</p><p>There are two supported approaches:</p><h4>Option 1: General (Shared) Ingress Route</h4><p>In this approach:</p><ul><li>A central ingress route file is used.</li><li>Services are manually added after deployment.</li><li>The configuration is maintained in:</li></ul><pre>ingress-route-file.yaml<br><br>apiVersion: networking.k8s.io/v1<br>kind: Ingress<br>metadata:<br>  name: your-ingress-name<br>  namespace: ingress-main<br>  annotations:<br>    nginx.ingress.kubernetes.io/force-ssl-redirect: &quot;true&quot;<br>    nginx.ingress.kubernetes.io/use-regex: &quot;true&quot;<br>    nginx.ingress.kubernetes.io/rewrite-target: /$2<br>    kubernetes.io/ingress.class: &quot;nginx&quot;<br>    # secrets-store.csi.k8s.io/used: &quot;true&quot;<br>    # cert-manager.io/cluster-issuer: &quot;letsencrypt-prod&quot;<br>spec:<br>  ingressClassName: nginx<br>  # REQUIRED BY AZURE POLICY: Defines the hostname(s) and the Kubernetes Secret for the TLS certificate<br>  tls:<br>  - hosts:<br>    - &quot;your-company.com&quot;  <br>    secretName: your-tls-secretname<br>    <br>  rules:<br>  - host: &quot;your-company.com&quot;<br>    http:<br>      paths:<br>      - path: /app1-dev(/|$)(.*)<br>        pathType: ImplementationSpecific<br>        backend:<br>          service:<br>            name: app1-dev<br>            port:<br>              number: 80<br>      - path: /app2-web(/|$)(.*)<br>        pathType: ImplementationSpecific<br>        backend:<br>          service:<br>            name: app2-web<br>            port:<br>              number: 80<br>      - path: /hello-world-service(/|$)(.*)<br>        pathType: ImplementationSpecific<br>        backend:<br>          service:<br>            name: hello-world-service<br>            port:<br>              number: 80</pre><h4>Process</h4><ol><li>Deploy application/service.</li><li>Update ingress-route-file.yaml.</li><li>Add routing rules for the new service.</li><li>Apply the updated configuration.</li></ol><h4>Use Case</h4><ul><li>Suitable for centralized route management.</li><li>Recommended for environments where routing is controlled by a platform or DevOps team.</li></ul><h3>Option 2: Service-Specific Ingress Route</h3><p>In this approach:</p><ul><li>Each service defines its own ingress configuration.</li><li>Routing rules are created per deployment.</li><li>Configuration can be included directly within the Helm chart of the service.</li></ul><pre>values.yaml<br><br><br># -- Ingress<br>ingress:<br>  enabled: false<br>  className: &quot;nginx&quot;<br>  annotations: <br>      kubernetes.io/`ingress.class: &quot;nginx&quot;<br>      nginx.ingress.kubernetes.io/rewrite-target: /$2<br>      nginx.ingress.kubernetes.io/force-ssl-redirect: &quot;true&quot; <br>      nginx.ingress.kubernetes.io/use-regex: &quot;true&quot;<br>  path: ServiceName<br>  hosts:<br>    - host: ingress_host<br>      paths:<br>        - path: /<br>          pathType: Prefix<br>  tls: <br>    enabled: true<br>    hosts:<br>      - ingress_host<br>      - secretName: ingress_secretName</pre><pre>ingress.yaml<br><br>{{- if .Values.ingress.enabled }}<br>apiVersion: networking.k8s.io/v1<br>kind: Ingress<br>metadata:<br>  name: {{ include &quot;myapp.fullname&quot; . }}<br>  namespace: {{ .Values.namespace.name | default .Release.Namespace }}<br>  labels:<br>    {{- include &quot;myapp.labels&quot; . | nindent 4 }}<br>  {{- with .Values.ingress.annotations }}<br>  annotations:<br>    {{- toYaml . | nindent 4 }}<br>  {{- end }}<br>spec:<br>  {{- if .Values.ingress.className }}<br>  ingressClassName: {{ .Values.ingress.className }}<br>  {{- end }}<br>  rules:<br>    {{- range .Values.ingress.hosts }}<br>    - host: {{ .host }}<br>      http:<br>        paths:<br>          {{- range .paths }}<br>          - path: {{ .path }}<br>            pathType: {{ .pathType }}<br>            backend:<br>              service:<br>                name: {{ include &quot;myapp.fullname&quot; $ }}<br>                port:<br>                  number: {{ $.Values.service.port }}<br>          {{- end }}<br>    {{- end }}<br>  {{- with .Values.ingress.tls }}<br>  tls:<br>    {{- toYaml . | nindent 4 }}<br>  {{- end }}<br>{{- end }}</pre><h3>Process</h3><ol><li>Define ingress configuration inside the service helm chartdeployment.</li><li>Add the code snippet to the Helm Chart “values.yaml” file.</li><li>Create a file “ingress.yaml” and add it to the Helm Chart template folder</li><li>Deploy via Helm.</li><li>Ingress route is automatically created as part of the deployment.</li></ol><h4>Use Case</h4><ul><li>Suitable for microservices architecture.</li><li>Enables teams to manage their own routing.</li><li>Improves deployment autonomy.</li></ul><h3>Stage 3: Automating ingress deployment via Azure DevOps Pipeline</h3><p>The task below can be added to your pipeline to enable the automation of the ingress deployment</p><pre>ADO Pipeline Task<br><br>Variables<br>    $(subscription_id)<br>    $(aks_rg_name)<br>    $(kubernetes_name)<br><br>- task: AzureCLI@2<br>  displayName: AKS CLI login    <br>  inputs:<br>    azureSubscription: &#39;Hanger-AKS-DEV&#39;<br>    scriptType: &#39;bash&#39;<br>    scriptLocation: &#39;inlineScript&#39;<br>    inlineScript: |<br>      echo &quot;login succesful&quot;<br>            <br>      echo &quot;setting subscription&quot;<br>      az account set --subscription $(subscription_id)<br><br>      echo &quot;Getting AKS Credentials&quot;<br>      az aks get-credentials --resource-group $(aks_rg_name) --name $(kubernetes_name) --overwrite-existing<br><br>      echo &quot;Installing kubelogin&quot;<br>      curl -LO https://github.com/Azure/kubelogin/releases/latest/download/kubelogin-linux-amd64.zip<br>      unzip kubelogin-linux-amd64.zip<br>      sudo mv bin/linux_amd64/kubelogin /usr/local/bin/<br><br>      echo &quot;Converting kubeconfig to use non-interactive login&quot;<br>      kubelogin convert-kubeconfig -l azurecli<br>      <br>      cd into your folder<br>      cat Ingress-Controller-file.sh<br>      ./Ingress-Controller-file.sh</pre><h4>Summary</h4><pre>Internal Client<br>                          (VM / App / VPN User)<br>                                   |<br>                                   |<br>                                   v<br>                    +----------------------------------+<br>                    | Internal Load Balancer (Private IP)<br>                    +----------------+------------------+<br>                                     |<br>                                     v<br>                          +----------------------+<br>                          | NGINX Ingress        |<br>                          | Controller Pods      |<br>                          +----------+-----------+<br>                                     |<br>                    -----------------------------------------<br>                    |                   |                   |<br>                    v                   v                   v<br>            +--------------+    +--------------+    +--------------+<br>            | Service A    |    | Service B    |    | Service C    |<br>            | (ClusterIP)  |    | (ClusterIP)  |    | (ClusterIP)  |<br>            +--------------+    +--------------+    +--------------+<br>                    |                   |                   |<br>                    v                   v                   v<br>                 Pods                Pods                Pods</pre><p>The ingress implementation consists of:</p><ul><li>Importing NGINX images into a private Azure Container Registry.</li><li>Deploying the Ingress Controller using Helm.</li><li>Configuring routing either:</li><li>Centrally (shared ingress file), or</li><li>Per service (Helm-based configuration).</li></ul><p>This setup ensures:</p><ul><li>Secure internal-only access (private IP).</li><li>Controlled image sourcing via private ACR.</li><li>Flexible routing configuration strategies.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7dfdf11dd7e0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying to Azure Container Apps Using Terraform and Bicep]]></title>
            <link>https://medium.com/@johnseyi51/deploying-to-azure-container-apps-using-terraform-and-bicep-6abbb0547d06?source=rss-c2e76ee953ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/6abbb0547d06</guid>
            <dc:creator><![CDATA[Ewuji John]]></dc:creator>
            <pubDate>Thu, 01 May 2025 14:30:37 GMT</pubDate>
            <atom:updated>2025-05-01T14:30:37.922Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*X0uCA2THquR2xed7XOv62g.png" /></figure><p>As organizations increasingly adopt <strong>infrastructure as code (IaC)</strong> practices, tools like <strong>Terraform</strong> and <strong>Bicep</strong> offer robust, declarative ways to consistently provision Azure resources. This guide explores how to deploy <strong>Azure Container Apps</strong> using <strong>Terraform,</strong> which is interwoven with <strong>Bicep. </strong>It compares their approaches while showing practical examples.</p><h3>🚀 What Are Azure Container Apps?</h3><p>Azure Container Apps is a serverless container service that allows developers to deploy containerized applications without managing underlying infrastructure. It’s built for microservices, APIs, background tasks, and event-driven processing and supports features like <strong>autoscaling</strong>, <strong>Dapr</strong>, and <strong>HTTP ingress</strong> out of the box.</p><h3>📁 GitHub Reference</h3><p>You can find a complete Terraform-based deployment in this repository:<br> 🔗 <a href="https://github.com/JbravoI/Container_App/blob/master/container_app_main/main.tf">GitHub — JbravoI/Container_App</a></p><p>This repo demonstrates how to deploy an Azure Container App using Terraform and includes the required configuration to create a resource group, managed environment, and the container app itself.</p><h3>🧰 Tool Overview</h3><p><strong>Terraform</strong>: A widely used open-source IaC tool that supports multi-cloud deployments. It uses its language called HCL (HashiCorp Configuration Language).</p><h3>🌐 Deployment Flow</h3><p>Whether using Terraform or Bicep, the general deployment flow looks like this:</p><ol><li><strong>Define infrastructure code</strong></li><li><strong>Provision an Azure Container Apps environment</strong></li><li><strong>Deploy the containerized app with proper configuration</strong></li><li><strong>Expose via external ingress or internal networking</strong></li></ol><h3>✅ Prerequisites</h3><ul><li>Azure CLI installed</li><li>Docker image in a registry (Azure Container Registry or Docker Hub)</li><li>Resource group created</li><li>Basic familiarity with Terraform or Bicep</li></ul><p>🏁 Deploy Steps</p><pre>terraform init<br>terraform plan<br>terraform apply</pre><p>Terraform will:</p><ul><li>Create the resource group</li><li>Deploy a Log Analytics</li><li>Set up the container app environment</li><li>Deploy the container app using your specified Docker image</li></ul><p>On the main file, ensure the <strong>Image</strong> and <strong>Name </strong>are correct before any deployment</p><pre>containers = [<br>          {<br>            image = &quot;mcr.microsoft.com/azuredocs/aci-tutorial-sidecar&quot;<br>            name  = &quot;sidecar&quot;,</pre><p>A way to deploy multiple container apps to the same environment was done here: 🔗 <a href="https://github.com/JbravoI/Container_App/tree/master/add_con_apps">GitHub — JbravoI/Container_App</a>/Add_con_apps</p><p>This process involves an iteration of the variable file containing a list of container apps, images, and settings in the format below:</p><pre>#Container App Variables<br>variable &quot;container_apps&quot; {<br>  type = list(object({<br>    name = string<br>    image = string<br>    tag = string<br>    containerPort = number<br>    ingress_enabled = bool<br>    min_replicas = number<br>    max_replicas = number<br>    cpu_requests = number<br>    mem_requests = string<br>  })}</pre><p>🔗 <a href="https://github.com/JbravoI/Container_App/blob/master/add_con_apps/variable.tf">GitHub — JbravoI/Container_App/Add_con_apps</a></p><h3>📌 Conclusion</h3><p><strong>Azure Container Apps</strong> offers a powerful, serverless platform tailored for modern application architectures, including microservices, APIs, event-driven systems, and background workers. Abstracting away the complexities of container orchestration, it allows developers to focus on building and deploying code rather than managing infrastructure.</p><p>When combined with <strong>Infrastructure as Code</strong> tools like <strong>Terraform</strong> and <strong>Bicep</strong>, teams gain the ability to automate deployments, maintain consistency across environments, and adopt DevOps best practices. Whether you’re building scalable web services or lightweight event processors, Azure Container Apps provides the flexibility, scalability, and simplicity to run containerized applications at scale with minimal operational overhead.</p><p>Here`s a link to my previous article on <a href="https://medium.com/@johnseyi51/deploying-toazure-container-apps-using-github-actions-2ad4fa871c0e"><strong>Deploying To Azure Container Apps using GitHub Actions.</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6abbb0547d06" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying To Azure Container Apps Using Github Actions.]]></title>
            <link>https://medium.com/@johnseyi51/deploying-toazure-container-apps-using-github-actions-2ad4fa871c0e?source=rss-c2e76ee953ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/2ad4fa871c0e</guid>
            <dc:creator><![CDATA[Ewuji John]]></dc:creator>
            <pubDate>Wed, 30 Apr 2025 00:12:35 GMT</pubDate>
            <atom:updated>2025-04-30T00:14:33.902Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/262/1*G7NgTNn4JXnoPHu4sFqF6w.jpeg" /><figcaption>Azure Container App Deployment</figcaption></figure><p>With the growing popularity of microservices and containerized workloads, <strong>Azure Container Apps</strong> offers a fully managed platform for deploying modern apps without managing infrastructure. Azure Container Apps is a serverless platform that allows you to maintain less infrastructure and save costs while running containerized applications. Instead of worrying about server configuration, container orchestration, and deployment details, Container Apps provides all the up-to-date server resources required to keep your applications stable and secure.</p><p>Common uses of Azure Container Apps include:</p><ul><li>Deploying API endpoints</li><li>Hosting background processing jobs</li><li>Handling event-driven processing</li><li>Running microservices</li></ul><p>This guide walks you through deploying an application to Azure Container Apps using GitHub Actions. Also it would show how to integrate Dapr connect with CosmosDB and Azure Service Bus.</p><h3>🧱 Prerequisites</h3><p>Before you begin, ensure you have the following:</p><ul><li>An <strong>Azure subscription</strong></li><li>A <strong>GitHub repository</strong> with your containerized app (e.g., Node.js, Python, .NET, etc.)</li><li>Dockerfile in your project root</li><li><strong>Azure CLI</strong> installed locally (for initial setup)</li><li><strong>Azure Container Registry (ACR)</strong> or Docker Hub (for container image hosting)</li><li>CosmosDB (You can use any Databases)</li><li>Azure Service Bus</li></ul><p>⚙️<strong>Get the connection values for the following</strong></p><ul><li><em>Cosmos DB yaml file</em></li></ul><pre>##daprstatedatabase.yml<br># statestore for Azure Cosmos DB component<br>componentType: state.azure.cosmosdb<br>version: v1<br>metadata:<br>  - name: masterKey<br>    value: {masterKey} <br>  - name: database<br>    value: {database} <br>  - name: collection<br>    value: {collection} <br>secrets:<br>  - name: url<br>    value: {ComosDb_url} <br>scopes:<br>  - {API_NAME}</pre><ul><li><em>Azure Service Bus yaml file</em></li></ul><pre>#daprstateservicebus.yml<br># statestore for Azure Service Bus component<br>componentType: pubsub.azure.servicebus<br>version: v1<br>metadata:<br>  - name: connectionString<br>    value: {SBConnectionString} <br>scopes:<br>  - {API_NAME}</pre><p>You can get more of the Dapr component connection parameters from <a href="https://docs.dapr.io/reference/components-reference/supported-pubsub/setup-azure-servicebus-queues/">Dapr Docs.</a></p><ul><li><em>Container App Yaml file</em></li></ul><pre>##containerapp.yaml<br>kind: containerapp<br>location: {LOCATION}<br>name: {API_NAME}<br>resourceGroup: {RESOURCE_GROUP}<br>type: Microsoft.App/containerApps<br>tags:<br>  tagname: {API_NAME}<br>properties:<br>  managedEnvironmentId: /subscriptions/{subscription_id}/resourceGroups/{RESOURCE_GROUP}/providers/Microsoft.App/managedEnvironments/{ENVIRONMENT}<br>  configuration:<br>    activeRevisionsMode: Multiple<br>    clientCertificateMode: accept<br>    secrets:<br>      - name: mysecret<br>        value: thisismysecret<br>    ingress:<br>      external: true<br>      allowInsecure: false<br>      targetPort: 80<br>      traffic:<br>        - latestRevision: true<br>          weight: 100<br>      transport: Auto<br>    registries:<br>      - passwordSecretRef: myregistrypassword<br>        server: {REGISTRY_LOGIN_SERVER} <br>        username: {REGISTRY_USERNAME} <br>    dapr:<br>      appId: {API_NAME}<br>      appPort: 80<br>      appProtocol: http<br>      enabled: true<br>  template:<br>    revisionSuffix: revision-{BuildNumber}<br>    containers:<br>      - image: {REGISTRY_LOGIN_SERVER}/{API_NAME}:{BuildNumber}<br>        name: {API_NAME}<br>        env:<br>          - name: HTTP_PORT<br>            value: 80<br>          - name: secret_name<br>            secretRef: mysecret<br>        resources:<br>          cpu: 0.5<br>          memory: 1Gi<br>        probes:<br>          - type: liveness<br>            httpGet:<br>              path: &quot;/health&quot;<br>              port: 8080<br>              httpHeaders:<br>                - name: &quot;Custom-Header&quot;<br>                  value: &quot;liveness probe&quot;<br>            initialDelaySeconds: 7<br>            periodSeconds: 3<br>          - type: readiness<br>            tcpSocket:<br>              port: 8081<br>            initialDelaySeconds: 10<br>            periodSeconds: 3<br>          - type: startup<br>            httpGet:<br>              path: &quot;/startup&quot;<br>              port: 8080<br>              httpHeaders:<br>                - name: &quot;Custom-Header&quot;<br>                  value: &quot;startup probe&quot;<br>            initialDelaySeconds: 3<br>            periodSeconds: 3<br>    scale:<br>      minReplicas: 1<br>      maxReplicas: 3</pre><p>🧩<strong>Github Actions yaml file for the CI/CD pipeline</strong></p><pre><br>name: Build and Deploy<br>on:<br>  push:<br>    branches: [main]<br>  workflow_dispatch:<br><br><br>env:  <br>  subscription_id:        ${{ secrets.subscription_id }}<br>  client_id:              ${{ secrets.client_id }}<br>  client_secret:          ${{ secrets.client_secret }}<br>  tenant_id:              ${{ secrets.tenant_id }}<br>  BuildNumber:            ${{github.run_number}} <br><br>jobs: <br>  build-and-deploy:<br>    runs-on: ubuntu-latest<br>    steps:<br><br>      - name: Azure Login<br>        run: az login --service-principal -u ${{ secrets.CLIENT_ID }} -p ${{ secrets.CLIENT_SECRET }} --tenant ${{ secrets.TENANT_ID }}<br><br>      - name: Replace tokens for containerapp.yaml<br>        uses: cschleiden/replace-tokens@v1.0<br>        with:<br>          tokenPrefix: &#39;{&#39;<br>          tokenSuffix: &#39;}&#39;<br>          files: &#39;[&quot;**/containerapp.yaml&quot;]&#39;<br>        env: <br>          BuildNumber:            ${{github.run_number}}<br>          API_NAME:               ${{env.API_NAME}} #Image Name<br>          REGISTRY_LOGIN_SERVER:  ${{ env.REGISTRY_LOGIN_SERVER }}  #Example: myregistry.azurecr.io<br>          REGISTRY_USERNAME:      ${{ env.REGISTRY_USERNAME }} #Container Registry Username<br>          REGISTRY_PASSWORD:      ${{ env.REGISTRY_PASSWORD }} <br>          RESOURCE_GROUP:         ${{env.RESOURCE_GROUP}} # RG<br>          ENVIRONMENT:            ${{env.ENVIRONMENT}}<br>          LOCATION:               ${{env.LOCATION}}<br><br>      - name: Replace tokens for daprstatedatabase.yml<br>        uses: cschleiden/replace-tokens@v1.0<br>        with:<br>          tokenPrefix: &#39;{&#39;<br>          tokenSuffix: &#39;}&#39;<br>          files: &#39;[&quot;**/daprstatedatabase.yml&quot;]&#39;<br>        env: <br>          ComosDb_url:    ${{env.ComosDb_url}}<br>          masterKey:      ${{env.masterKey}}<br>          database:       ${{env.database}}<br>          collection:     ${{env.collection}}<br>          API_NAME:       ${{env.API_NAME}} #Image Name<br><br>      - name: Replace tokens for daprstateservicebus.yml<br>        uses: cschleiden/replace-tokens@v1.0<br>        with:<br>          tokenPrefix: &#39;{&#39;<br>          tokenSuffix: &#39;}&#39;<br>          files: &#39;[&quot;**/daprstateservicebus.yml&quot;]&#39;<br>        env: <br>          SBConnectionString:   ${{env.SBConnectionString}}<br>          API_NAME:             ${{env.API_NAME}} <br>      <br>        #In some senarios the replace token task doen`t take effect, you can use this bash script instead<br>      - name: update tokens <br>        run: |<br>         bash -c &quot;sed -i &#39;s/BuildNumber/${{github.run_number}}/g&#39;  containerapp.yaml&quot;<br>         bash -c &quot;sed -i &#39;s/REGISTRY_LOGIN_SERVER/${{env.REGISTRY_LOGIN_SERVER}}/g&#39;  containerapp.yaml&quot;<br>         bash -c &quot;sed -i &#39;s/REGISTRY_USERNAME/${{env.REGISTRY_USERNAME}}/g&#39;  containerapp.yaml&quot;<br>         bash -c &quot;sed -i &#39;s/REGISTRY_PASSWORD/${{env.REGISTRY_PASSWORD}}/g&#39;  containerapp.yaml&quot;<br>         bash -c &quot;sed -i &#39;s/API_NAME/${{env.API_NAME}}/g&#39;  containerapp.yaml&quot;<br>         bash -c &quot;sed -i &#39;s/RESOURCE_GROUP/${{env.RESOURCE_GROUP}}/g&#39;  containerapp.yaml&quot;<br>         bash -c &quot;sed -i &#39;s/ENVIRONMENT/${{env.ENVIRONMENT}}/g&#39;  containerapp.yaml&quot;<br>         bash -c &quot;sed -i &#39;s/LOCATION/${{env.LOCATION}}/g&#39;  containerapp.yaml&quot;<br>         bash -c &quot;sed -i &#39;s/API_NAME/${{env.API_NAME}}/g&#39;  daprstatedatabase.yml&quot;<br>         bash -c &quot;sed -i &#39;s/API_NAME/${{env.API_NAME}}/g&#39;  daprstateservicebus.yml&quot;<br>         bash -c &quot;sed -i &#39;s/API_NAME/${{env.API_NAME}}/g&#39;  daprstateservicebus.yml&quot;     <br><br>      - name: &#39;Publish Artifact&#39;<br>        uses: actions/upload-artifact@v3<br>        with:<br>          name: artifact-containerapp-yaml<br>          path: containerapp.yaml<br><br>      - name: &#39;Publish Artifact&#39;<br>        uses: actions/upload-artifact@v3<br>        with:<br>          name: artifact-daprstatedatabase.yml<br>          path: daprstatedatabase.yml<br><br>      - name: &#39;Publish Artifact&#39;<br>        uses: actions/upload-artifact@v3<br>        with:<br>          name: artifact-daprstatedatabase.yml<br>          path: daprstatedatabase.yml<br><br><br>  #Build image and push to Container Registry<br>      - name: &#39;Build and Push image&#39;<br>        uses: azure/docker-login@v1<br>        with:<br>          login-server: ${{ env.REGISTRY_LOGIN_SERVER }}<br>          username: ${{ env.REGISTRY_USERNAME }}<br>          password: ${{ env.REGISTRY_PASSWORD }}<br>      - run: |<br>          docker build . -t ${{ env.REGISTRY_LOGIN_SERVER }}/${{env.API_NAME}}:${{github.run_number}}<br>          docker push ${{ env.REGISTRY_LOGIN_SERVER }}/${{env.API_NAME}}:${{github.run_number}}<br><br>      - name: &#39;Pull image&#39;<br>        uses: azure/docker-login@v1<br>        with:<br>          login-server: ${{ env.REGISTRY_LOGIN_SERVER }}<br>          username: ${{ env.REGISTRY_USERNAME }}<br>          password: ${{ env.REGISTRY_PASSWORD }}<br>      - run: |<br>          az config set extension.use_dynamic_install=yes_without_prompt<br><br>  #Dapr Connection for CosmosDB<br>      - run: |<br>          az containerapp env dapr-component set \<br>            --name ${{env.ENVIRONMENT}} --resource-group ${{env.RESOURCE_GROUP}} \<br>            --dapr-component-name statestoredbconnection \<br>            --yaml &quot;daprstatedatabase.yml&quot;<br><br>  #Dapr Connection for Service Bus<br>      - run: |<br>          az containerapp env dapr-component set \<br>            --name ${{env.ENVIRONMENT}} --resource-group ${{env.RESOURCE_GROUP}} \<br>            --dapr-component-name stateservicebusconnection \<br>            --yaml &quot;daprstateservicebus.yml&quot;<br><br>      - name: Resource group list<br>        run: az containerapp env list --resource-group ${{env.RESOURCE_GROUP}} <br><br>  #Create Conatiner Apps/Revisions<br>      - run: |<br>          az containerapp create -n ${{env.API_NAME}}   -g ${{env.RESOURCE_GROUP}}  --environment ${{env.ENVIRONMENT}} \<br>            --yaml &quot;containerapp.yaml&quot;</pre><h3>🎉 Conclusion</h3><p>Using GitHub Actions with Azure Container Apps creates a powerful and flexible CI/CD pipeline with minimal effort. With every commit to your main branch, your app will automatically build and deploy — accelerating your development cycle and ensuring consistent deployments.</p><p>Referrences</p><p><a href="https://learn.microsoft.com/en-us/azure/container-apps/overview">Microsoft Learn</a></p><p><a href="https://dapr.io/">Dapr Docs</a></p><p>On my Next Write-Up, i`ll be writing on how to perform the deployment using terraform.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2ad4fa871c0e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying a Spring Boot App to a Kubernetes Cluster]]></title>
            <link>https://medium.com/@johnseyi51/deploying-a-spring-boot-app-to-a-kubernetes-cluster-7899997a82bf?source=rss-c2e76ee953ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/7899997a82bf</guid>
            <dc:creator><![CDATA[Ewuji John]]></dc:creator>
            <pubDate>Wed, 23 Apr 2025 10:48:45 GMT</pubDate>
            <atom:updated>2025-04-23T10:48:45.256Z</atom:updated>
            <content:encoded><![CDATA[<p>The GitHub repository <a href="https://github.com/JbravoI/Spring-Boot-Application">JbravoI/Spring-Boot-Application</a> offers a comprehensive template for building and deploying a Java-based web application using Spring Boot. It integrates essential tools and configurations to streamline development and deployment processes.</p><h3>🚀 Project Overview</h3><p>This repository is structured to facilitate rapid development and deployment of Spring Boot applicationsIt includes configurations for containerization, continuous integration, and deployment orchestration</p><h3>🗂️ Project Structure</h3><p>The repository is organized as follow:</p><p>.github/workflows/: Contains GitHub Actions workflows for CI/CD automatio. .mvn/wrapper/: Includes Maven Wrapper files for consistent build environment. k8s/: Houses Kubernetes deployment manifests for orchestrating application deploymen. src/: Contains the main application source cod. dockerfile: Defines the Docker image build instruction. deployment.yaml: Specifies Kubernetes deployment configuration. pom.xml: Maven Project Object Model file managing project dependencies and build configuration.</p><h3>⚙️ Key Features</h3><h3>1. Spring Boot Integration</h3><p>The application leverages Spring Boot’s capabilities for rapid developmen. By using the @SpringBootApplication annotation, it simplifies configuration and component scanning, allowing developers to focus on business logic.</p><h3>2. Containerization with Docker</h3><p>A dockerfile is provided to containerize the application, enabling consistent environments across development, testing, and productio. This facilitates easy deployment and scalabilit.</p><h3>3. Continuous Integration with GitHub Actions</h3><p>The .github/workflows/ directory contains workflows that automate the build and deployment processe. This ensures that code changes are automatically tested and deployed, enhancing development efficienc. citeturn0search5</p><h3>4. Deployment with Kubernetes</h3><p>Kubernetes manifests in the k8s/ directory define the application&#39;s deployment configuration. This allows for scalable and manageable deployments in a Kubernetes cluste.</p><h3>🛠️ Getting Started</h3><p>To set up and run the application:</p><p><strong>Clone the Repository:</strong></p><ul><li>git clone https://github.com/JbravoI/Spring-Boot-Application.git cd Spring-Boot-Application</li></ul><p><strong>Build the Application:</strong>./mvnw clean install</p><p><strong>Run the Application:</strong>./mvnw spring-boot:run</p><p><strong>Access the Application:</strong></p><p>Navigate to http://localhost:8080 in your web browser to interact with the application.</p><h3>📦 Deployment</h3><h3>Docker Deployment / File</h3><p>To build and run the Docker contaier:<a href="https://github.com/JbravoI/Spring-Boot-Application/blob/main/dockerfile">Docker File</a></p><h4>Creating AKS Cluster &amp; ACR using terraform (IaC).</h4><p>​The GitHub repository <a href="https://github.com/JbravoI/k8s-CR-CI">JbravoI/k8s-CR-CI</a> provides a practical example of setting up Azure Kubernetes Service (AKS) and Azure Container Registry (ACR) for continuous integration and deployment using terraform. This guide focuses on creating and configuring AKS and ACR, omitting the container instance section.​</p><h3>🛠️ Prerequisites</h3><p>Before proceeding, ensure you have:</p><ul><li>An active <a href="https://azure.microsoft.com/free/">Azure subscription</a></li><li><a href="https://learn.microsoft.com/en-us/cli/azure/install-azure-cli">Azure CLI</a> installed (version 2.0.55 or later)</li><li><a href="https://kubernetes.io/docs/tasks/tools/">kubectl</a> installed​</li><li>Terraform (You can use chocolately to install it on windows OS)</li></ul><p>Ensure your AKS cluster is integrated to ACR using this CLI</p><pre># Attach using acr-name<br>az aks update - name myAKSCluster - resource-group myResourceGroup - attach-acr &lt;acr-name&gt;<br><br># Attach using acr-resource-id<br>az aks update - name myAKSCluster - resource-group myResourceGroup - attach-acr &lt;acr-resource-id&gt;</pre><p>Using CI/CD pipeline via GitHub Actions</p><p>You can use the Yaml file here : <a href="https://github.com/JbravoI/Spring-Boot-Application/blob/main/.github/workflows/mavendeployment.yml">Yaml-Pipeline</a></p><p>Ensure the following varibles are configured accurately</p><pre>secrets.AZURE_ACR_NAME<br>secrets.username<br>secrets.password<br>secrets.AZURE_RESOURCE_GROUP<br>secrets.AZURE_AKS_CLUSTER</pre><p>Configure Ingress-Controller :</p><p><a href="https://ammarsuhail155.medium.com/ingress-controller-nginx-deployment-on-azure-kubernetes-services-29ca0a668083">INGRESS-CONTROLLER -NGINX DEPLOYMENT ON AZURE KUBERNETES SERVICES</a></p><p>After ingress configuration, run :</p><pre>kubectl expose deployment &lt;deployment name&gt;<br>kubectl get ing<br>kubectl edit ing &lt;ingress name&gt;<br><br>Input the name of the service/deployment, save &amp; close.<br>Sample :<br><br>      - backend:<br>          service:<br>            name: service-name<br>            port:<br>              number: 80<br>        path: /service-name(/|$)(.*)<br>        pathType: PrefixB</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/645/0*mk-w250_qEiBXP3B" /></figure><p>Browse the AKS Public FQDN</p><p>And <em>EXTERNAL_IP/hello-world-two</em>: (<em>EXTERNAL_IP/service-name)</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/316/0*7uWRYZVZC-9J-0Um" /></figure><p>You can read more on the spring-boot process via :<a href="https://spring.io/guides/gs/spring-boot"> Sprint Boot App</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7899997a82bf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Linux to Azure ADDS Integration]]></title>
            <link>https://medium.com/@johnseyi51/linux-to-azure-adds-integration-8f79fe4250ab?source=rss-c2e76ee953ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/8f79fe4250ab</guid>
            <dc:creator><![CDATA[Ewuji John]]></dc:creator>
            <pubDate>Mon, 21 Apr 2025 09:58:46 GMT</pubDate>
            <atom:updated>2025-04-21T09:58:46.147Z</atom:updated>
            <content:encoded><![CDATA[<p>Azure AD DS integrates with your existing Azure AD tenant.</p><p>This integration allows users sign in using their corporate credentials, and you can use existing groups and user accounts to secure access to resources.</p><p>Kindly note the following :</p><ul><li>Understand DNS requirements for a managed domain</li><li>Create a managed domain</li><li>Enable password hash synchronization</li></ul><p>Prerequisites:<br>- An Azure Active Directory tenant associated with your subscription, either synchronized with an on-premises directory or a cloud-only directory.<br>- You need Application Administrator and Groups Administrator Azure AD roles in your tenant to enable Azure AD DS.<br>- You need Domain Services Contributor Azure role to create the required Azure AD DS resources.<br>- A virtual network with DNS servers that can query necessary infrastructure such as storage. DNS servers that can’t perform general internet queries might block the ability to create a managed domain.</p><p>If you create a custom domain name, take care with existing DNS namespaces. It’s recommended to use a domain name separate from any existing Azure or on-premises DNS name space.</p><p>For example, if you have an existing DNS name space of contoso.com, create a managed domain with the custom domain name of addscontoso.com. If you need to use secure LDAP, you must register and own this custom domain name to generate the required certificates.</p><p>How to Create AD DS in an Azure Subscription</p><p>To create an Azure Active Directory (Azure AD) tenant in the Azure portal, navigate to “Create a resource,” then select “Identity” and “Azure Active Directory.” Provide an organization name, initial domain name, and region, then select “Create.”</p><p>This process creates the following :</p><ul><li>Creates a virtual network named adds-vnet that uses the IP address range.</li><li>Creates a subnet named aadds-subnet using the IP address range.</li></ul><p>Ensure to Synchronizes All users from Azure AD into the managed domain. The managed domain is associated with your Azure AD tenant. During the provisioning process, Azure AD DS creates two Enterprise Applications named <strong>Domain Controller Services</strong> and <strong>Azure Active Directory Domain Controller Services</strong> in the Azure AD tenant. These Enterprise Applications are needed to service your managed domain. Don’t delete these applications.</p><p><strong>Another easy proceedure i can list is this :</strong></p><ul><li>Get elevation for the deployment (PIM)</li><li>Create a vnet (You can use pre-existing vnet)</li><li>Create the ADDS (Set DNS Domain name = test-test.local)</li><li>Attach the Vnet during creation of ADDS</li><li>After deploying Enable the DNS</li><li>Connect the Vnet to the DNS Server by updating the DNS Service having this IP Addresses (10.4.0.36 10.4.0.37).</li></ul><p>1. This can be done manually by going to the Properties in the ADDS, get the two DNS IP, Move to the VNET DNS Servers (Change from Default to custom and input the two DNS server IPs)<br> 2. When adding a new Vnet, There will need to be an editing of the “Replica set” by adding the new Vnets manually.</p><ul><li>Create a VM. (VM should be created with the Vnet attached to the DNS)</li><li>Updating Legacy password Hash Sync (Admin users would need to change their passwords to enable sync with the hashing of password)</li><li>Use the new credential to join the VM to the newly created Domain.</li><li>Restart the VM to update Group policy.</li><li>Add groups that should have access to particular VMs. [Check for Remote Desktop under settings, select user accounts, add the group]</li><li>Add the Active directory Tools. [This can be used to configure and manage ADDS]</li></ul><p>[If the Organization uses a Windows on-prem AD initially, follow the steps below]<br> — Run the Force sync AD Connect script to sync passwords between Windows Active Directory &amp; Azure DDS.</p><p>Things advised to be implemented after Configuring the ADDS<br>1. Groups needs to be created<br>2. Making The Administrators Group as well as other required groups and assign users to the groups.</p><p><strong>STEP for Joining of Linux VM to the Domain.</strong></p><ul><li>Switch to root user<br>$sudo -i</li><li>APT Update<br>$ sudo apt update</li><li>Installation packages required for domain joining of ubuntu <br>$ sudo apt install sssd-ad sssd-tools realmd adcli</li><li>Check the installed packages of SSSD<br>$ apt policy sssd-ad sssd-tools realmd adcli</li><li>Install required packages :<br>$sudo apt install -y realmd libnss-sss libpam-sss sssd sssd-tools adcli samba-common-bin oddjob oddjob-mkhomedir packagekit</li><li>Update hostname of Ubuntu to AD domain (vm-name.domain-name)<br>$sudo hostnamectl set-hostname xxxx-test-VM5.xxxx-test.local</li><li>Disable systemd-resolved<br>$sudo systemctl disable systemd-resolved.service<br>$sudo systemctl stop systemd-resolved.service</li><li>Configure the IP ADDRESS<br>$sudo vi /etc/hosts<br>input the following <br>x.x.x.1 xxxxx-test-VM5.xxxxx-test.local<br>x.x.x.36 xxxxx-test-li-vm2.xxxxx-test2.com xxxxx-test-li-vm2<br>x.x.x.37 xxxxx-test-li-vm2.xxxxx-test2.com xxxxx-test-li-vm2<br>x.x.x.36 E41JG8GVxxxxxx E41JG8GVxxxxxx.xxxxx-test.local<br>x.x.x.37 G230MWYxxxxxx G230MWYxxxxxx.xxxxx-test.local</li><li>Run this<br>$sudo vi /etc/resolv.conf<br>input the following <br>nameserver x.x.x.36<br>nameserver x.x.x.37</li><li>Join to Domain<br>$realm discover xxxxx-test.local<br>$realm join xxxxx-test.local -v -U xxxxx_test_user@xxxxx-TEST.LOCAL<br>$realm join xxxxx-test.local -v -U <a href="/service/mailto:xxxxx_test_user@M365X62628102.ONMICROSOFT.COM">xxxxx_test_user@M365X62628102.ONMICROSOFT.COM</a> P@ssw0rxxxxx</li><li>Update the NTP<br>$ apt install ntpdate<br>$ apt install ntp<br>$ ntpdate -u “in.pool.ntp.org”<br>$ sudo service ntp restart</li></ul><p>These steps are what have been tested on several Linux VMs, yu can review it and check other documentation to guide on this process.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8f79fe4250ab" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>