<?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 Olawale Badmus on Medium]]></title>
        <description><![CDATA[Stories by Olawale Badmus on Medium]]></description>
        <link>https://medium.com/@fobadmus?source=rss-ed6454bd0406------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*fVrq0wFIv53dF1u3.jpg</url>
            <title>Stories by Olawale Badmus on Medium</title>
            <link>https://medium.com/@fobadmus?source=rss-ed6454bd0406------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 18:35:48 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@fobadmus/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[NGINX Webserver Deployment]]></title>
            <link>https://medium.com/@fobadmus/nginx-webserver-deployment-c5cf7d6b1fd1?source=rss-ed6454bd0406------2</link>
            <guid isPermaLink="false">https://medium.com/p/c5cf7d6b1fd1</guid>
            <category><![CDATA[servers]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[nginx]]></category>
            <category><![CDATA[deployment]]></category>
            <dc:creator><![CDATA[Olawale Badmus]]></dc:creator>
            <pubDate>Sat, 01 Feb 2025 01:17:25 GMT</pubDate>
            <atom:updated>2025-02-01T01:30:08.980Z</atom:updated>
            <content:encoded><![CDATA[<p>This short article is meant to briefly discuss the process of deploying a webserver (Nginx) and making it accessible via a public IP address.</p><p>There are several ways of accomplishing this task, however, i decided to host it on AWS server. Setup an AWS EC2 instance with necessary configurations ranging from the choice of instance (ubuntu) to the storage tier. Also the security group inbound rule was configured to allow incoming HTTP traffic on port 80 which nginx uses by default. A snapshot of the configuration is shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yNdRiNR33J6kPdrR4880nQ.png" /><figcaption>EC2 Instance overview</figcaption></figure><p>Upon setting up the server, ssh into the instance. Run the below command depending on the distro you are using to ensure that all dependencies are up to date.</p><pre>apt update </pre><pre>yum update</pre><p>Subsequently install nginx using the right command. it could be either command below. Executing this command require sudo level privilege.</p><pre>sudo yum install nginx<br></pre><pre>sudo apt install nginx</pre><p>After successful installation of nginx, start and enable the service by running the below command</p><pre>systemctl start nginx &amp;&amp; systemctl enable nginx</pre><p>Check the status of the service to ensure that it is running by using the below command .</p><pre>systemctl status nginx</pre><p>Afterwards, navigate to <strong>/var/www/html</strong> to edit or create the <strong>index.html</strong> file to your desire. Upon completing that, navigate to <strong>/etc/nginx/sites-available</strong>. When in this directory, you can either edit the <strong>default </strong>file or create a new server file. I opted for creating a new server file which was configured as shown below. In the servername, the public ip address which was earlier configured while creating the instance was utilized.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V1ezJH4bYHgUMdu0PHqCGA.png" /><figcaption>Nginx server config file.</figcaption></figure><p>After successful configuration of the file, soft link the file to the <strong>/etc/nginx/sites-enabled</strong> directory using the command</p><pre>ln -s /etc/nginx/sites-available/[your_file_name] /etc/nginx/sites-enabled/</pre><p>Also, remove the <strong>default</strong> file in the <strong>/etc/nginx/sites-enabled/ </strong>directory unless you are utilizing the default server configuration file.</p><p>After all this process, test the configuration by using the below command</p><pre>sudo nginx -t</pre><p>This will let you know if your configuration file is error free or not. The response gotten after testing my configuration is shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XiSemSn4MX5VvJ-7KyxH4Q.png" /><figcaption>Nginx config file test result.</figcaption></figure><p>Once you confirmed that the configuration passes the test, restart the nginx by using the command `systemctl restart nginx`. Then access the server using your public ip address. In my case, my webserver was accessed via <strong>18.119.131.11</strong> as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LxHGZx6Tik8nlVRGUfvfXg.png" /><figcaption>Working web server</figcaption></figure><p>With this you have successfull configured a working NGINX server. <strong>Hurray!!!!</strong></p><p>## References</p><p>1. HNG. “Hire DevOps Engineers.” Retrieved from [<a href="https://hng.tech/hire/devops-engineers](https://hng.tech/hire/devops-engineers).">https://hng.tech/hire/devops-engineers](https://hng.tech/hire/devops-engineers).</a> <br>2. HNG. “Hire Cloud Engineers.” Retrieved from [<a href="https://hng.tech/hire/cloud-engineers](https://hng.tech/hire/cloud-engineers).">https://hng.tech/hire/cloud-engineers](https://hng.tech/hire/cloud-engineers).</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c5cf7d6b1fd1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Prometheus deployment on Kubernetes]]></title>
            <link>https://medium.com/@fobadmus/prometheus-deployment-on-kubernetes-a397290cd11c?source=rss-ed6454bd0406------2</link>
            <guid isPermaLink="false">https://medium.com/p/a397290cd11c</guid>
            <category><![CDATA[helm]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[logging-and-monitoring]]></category>
            <category><![CDATA[prometheus]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Olawale Badmus]]></dc:creator>
            <pubDate>Sun, 04 Aug 2024 15:55:29 GMT</pubDate>
            <atom:updated>2024-08-04T15:55:29.804Z</atom:updated>
            <content:encoded><![CDATA[<p>This article is a quick tutorial on deploying Prometheus on the Kubernetes cluster for metrics scraping and tracking. The Prometheus deployment will enable the monitoring of Kubernetes cluster.</p><p><strong>Prerequisites’</strong></p><p>For the sake of this tutorial, one will need a local machine running Kubernetes on a Linux OS is required. If one does not have Kubernetes running on their device, detailed installation instructions can be found through this link</p><p><a href="https://minikube.sigs.k8s.io/docs/start/?arch=%2Flinux%2Fx86-64%2Fstable%2Fbinary+download">minikube start</a></p><p>Once the installation is successful, the deployment of Prometheus on the Kubernetes cluster can begin.</p><p>Let’s have a basic understanding of some terminologies peculiar to this article</p><p><strong>Helm</strong></p><p>Helm is a Kubernetes package manager that helps bundle all necessary configurations needed for the smooth running of an application on Kubernetes. It helps in defining, installing, and upgrading the Kubernetes application. Once the files have been packaged, the application can be installed by using the command:</p><pre>helm install</pre><p><strong>Helm Chart</strong></p><p>This is a collection of templates and YAML files that are converted into Kubernetes manifest files. It can be easily shared with others by uploading the chart to a repository.</p><p><strong>Node Exporter</strong></p><p>This makes various machine resource metrics like network, memory, CPU utilization, disk, file system information, and measurement possible. It can be installed in two ways either manually or through the usage of Kubernetes daemonSet which ensures that a pod runs on every node in a cluster. Hence, with the daemonSet, the node monitoring daemon can be run on every node.</p><p><strong>Kube State Metrics</strong></p><p>This is a listening service that leverages the Kubernetes api to expose cluster-level metrics like pod, deployment, and services. The metrics are often exported on the HTTP endpoint.</p><p><strong>Kubernetes operator</strong></p><p>This is an application-specific controller that extends the Kubernetes API to create/configure/manage instances of complex applications. For instance, in this Prometheus tutorial, a Prometheus operator will be utilized which will allow the management of the entire lifecycle of Prometheus.</p><p>The Prometheus operator has several custom resources like alertmanager, alertManagerConfig, PrometheusRule, ServiceMonitor, and podMonitor that aid the deployment and management of a Prometheus instance.</p><p>For Kubernetes, we will be utilizing Prometheus service discovery which will access the Kubernetes API to scrape the metrics we are interested in like Node Exporter, kube state metrics, and kube component.</p><figure><img alt="A graphical representation of the connection between kubernetes api, prometheus and kubernetes metrics" src="https://cdn-images-1.medium.com/max/1024/1*_ag2vbKK31gQLAW6PN9qIg.png" /><figcaption>source: kodekloud</figcaption></figure><p><strong>Prometheus Deployment.</strong></p><p>The Prometheus will be deployed within the Kubernetes cluster as this allows the usage of pre-existing Kubernetes infrastructure in addition to deploying it as close to the target as possible.</p><figure><img alt="Architectural representation of prometheus deployment within kubernetes cluster" src="https://cdn-images-1.medium.com/max/861/1*1dMGknZSgkVriVLmGnmJwQ.png" /><figcaption>source: kodekloud</figcaption></figure><p>There are two major ways of deploying Prometheus. It can either be deployed manually which will require creating all manifest like deployment, service, secrets, and configmap needed for the successful operation of Prometheus, or through Prometheus operator utilization which can be deployed using a helm chart.</p><p>Considering that the manual process is cumbersome and time-consuming, in this tutorial, the helm chart process is adopted as it is the most efficient process. It allows the usage of Prometheus, alert managers, Prometheus operators, and some other utils.</p><p>The helm chart can be found in this repository</p><p><a href="https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack">helm-charts/charts/kube-prometheus-stack at main · prometheus-community/helm-charts</a></p><ol><li>Be sure to have helm installed on one’s device. If it is not yet installed on the local device, one can get it installed by following the instructions in this link <a href="https://helm.sh/docs/intro/install/">https://helm.sh/docs/intro/install/</a></li></ol><p>Upon successful installation, the installation can be verified using the command</p><pre>helm version</pre><p>2. Run the command below to add the helm repository</p><pre>helm repo add Prometheus-community https://prometheus-community.github.io/helm-charts</pre><p>3. Update the repository using the command</p><pre>helm repo update</pre><p>4. Once the update has been completed, then one can proceed to install the Prometheus operator using the syntax below.</p><pre>helm install [RELEASE_NAME] Prometheus-community/kube-prometheus-stack</pre><p>The RELEASE_NAME can be any word. For instance, I named mine fob-prometheus as can be seen in the image below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q7Twj8rRS4nxUy8QD7OCXQ.png" /></figure><p>For detailed information about the recent installation, run the command</p><pre>kubectl get all</pre><p>Typically, the output will have two stateful sets, one for Prometheus and the other for alertmager. Also, there are usually three deployment files which are the Prometheus-grafana, Prometheus-kube-prometheus-operator, and Prometheus-kube-state-metrics.</p><p>As a reminder, the node-exporter daemonsets allow the deployment of node-exporter on numerous nodes without having to manually install it on individual nodes.</p><p>5. Get the Kubernetes service as shown below by running the following command.</p><pre>kubectl get service</pre><p>As it can be seen, all services are by default set as cluster IPs which prevent their exposure to the public. To access the Prometheus server or any server, the corresponding service of such server needs to be configured to either use load balancing, ingress, or port forwarding. For this tutorial, the port forwarding method will be adopted for the Prometheus service which is named fob-prometheus-kube-promet-prometheus.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-K0QyEWEPejY4j0lUNGtgw.png" /></figure><p>6. Port Forwarding: Utilize the command <strong>Kubectl get pod </strong>to identify the Prometheus pod that needs to be forwarded.</p><p>Subsequently, run the following command to forward the Prometheus port to the desired port address</p><pre>kubectl port-forward Prometheus-fob-prometheus-kube-promet-prometheus-0 9090.</pre><p>Depending on one’s port ID and desired port address, the last two words of the command can differ, however, the widely used port for Prometheus is 9090.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b-27nJ8o4MHRTrNPYzM18g.png" /></figure><p>7. Connecting to Prometheus</p><p>Prometheus server can then be accessed by following the address after successful port forwarding. In my case, it is 127.0.0.1:9090 which is the same as</p><pre>localhost:9090</pre><p>After following the above-mentioned steps, one should have a UI similar to the image below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rGFVwihvkRyh1QKuMZGQcQ.png" /></figure><p>With the above image, one has successfully connected to Prometheus and one can start scraping and tracking metrics as required.</p><p>Further discussion on scraping of deployed applications in the Kubernetes cluster is beyond this text’s scope but will be addressed in my future text.</p><p><strong>Thank you for going through this tutorial with me.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a397290cd11c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>