<?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 Cyrus Mutua on Medium]]></title>
        <description><![CDATA[Stories by Cyrus Mutua on Medium]]></description>
        <link>https://medium.com/@Cyrus_M?source=rss-cc64ac293a8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*I_Od6XR9zxLVwGJVTWgmUQ.jpeg</url>
            <title>Stories by Cyrus Mutua on Medium</title>
            <link>https://medium.com/@Cyrus_M?source=rss-cc64ac293a8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 22:09:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@Cyrus_M/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[ARP SPOOFING: A MAN-IN-THE-MIDDLE ATTACK SIMULATION]]></title>
            <link>https://medium.com/@Cyrus_M/arp-spoofing-a-man-in-the-middle-attack-simulation-64e0057857bf?source=rss-cc64ac293a8------2</link>
            <guid isPermaLink="false">https://medium.com/p/64e0057857bf</guid>
            <dc:creator><![CDATA[Cyrus Mutua]]></dc:creator>
            <pubDate>Fri, 25 Jul 2025 12:58:48 GMT</pubDate>
            <atom:updated>2025-07-25T12:58:48.199Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/571/1*2-_vrsLbZtjAweOdrpNMdA.png" /></figure><p>The Address Resolution Protocol abbreviated as ARP is a layer 3 protocol of the OSI model which is used to map <strong><em>IP addresses</em></strong> to their respective <strong><em>MAC addresses</em></strong> in a local area network. It is important to note that IP addresses are used to identify devices at the network layer (layer 3) while MAC addresses on the other hand are used to identify devices at layer 2 or the data link layer.</p><p><strong><em>How ARP works</em></strong></p><p>Assuming we have two devices A and B in a network with the IP addresses 192.168.1.2 and 192.168.1.3 respectively. Device A wants to send a message to device B but it does not know the actual location of device B on the network.</p><ol><li>Device A sends an <strong><em>ARP request broadcast</em></strong> asking <strong><em>who has IP 192.168.1.3</em></strong><em>.</em></li><li>Device B responds with an <strong><em>ARP reply unicast</em></strong> with its MACaddress.</li><li>Device A saves the IP-MAC address pair in its <strong><em>ARP cache</em></strong> sometimes referred to as the <strong><em>ARP table</em></strong> so as to avoid repeating the same process incase device A wants to communicate with device B again.</li></ol><p><strong><em>What is ARP spoofing?</em></strong></p><p><em>ARP spoofing</em> sometimes refered to as <em>ARP cache poisoning</em> is a cyber attack where an attacker sends ARP messages which are false over a local area network. The idea is to associate the attacker’s MAC address with the IP address of a host in the network could be a gateway, router or the victim’s computer so that all traffic meant for that IP address is sent to the attacker instead.</p><p><strong><em>How ARP spoofing works</em></strong></p><p>In ARP spoofing, an attacker:</p><ol><li>Sends fake ARP replies to victims saying “<em>Hey, 192.168.1.3 is at my MAC address”.</em></li><li>The victim updates its ARP Cache table asociating the wrong MAC address to the IP address.</li><li>This means that all network traffic associated with that IP address will be send to the attacker.</li></ol><p>In this lab activity, we are going to simulate ARP spoofing by performing a man-in-the-middle attack in a controlled lab environment. This lab also serves as an eye opener to the importance of secure communication protocols and establishment of network defenses.</p><p><strong><em>Lab requirements</em></strong></p><ol><li>VirtualBox</li><li>Two Virtual Machines. Attacker Machine: Bodhi Linux or any Linux distro; Victim Machine: Metasploitable.</li><li>Internal Network setup.</li><li>Tools: arpspoof, Wireshark protocol analyzer, dsniff package.</li><li>IP Fowarding enabled.</li></ol><p><strong><em>Lab Instructions.</em></strong></p><p><strong><em>Step 1: Configure the Internal Network.</em></strong></p><p>In this step, we assign both virtual machines to the same internal network and assign static IP addresses. Ensure that both virtual machines are able to communicate with each other. Run the following commands on the terminal of both virtual machines to assign static IP addresses. Ensure that the correct ethernet adapter is selected.</p><p><strong><em>On the attacker’s machine;</em></strong></p><pre>sudo ifconfig enp0s3 192.168.10.10 netmask 255.255.255.0 up</pre><p>The above command assigns the attacker’s machine the IP address 192.168.10.10. The ethernet interface in our case is <strong>enp0s3</strong><em> </em>for bodhi linux. Make sure to use the correct ethernet interface. Run <strong>ifconfig </strong>on your attack machine to check for the correct ethernet interface.</p><p><strong><em>On Metasploitable;</em></strong></p><pre>sudo ifconfig eth0 192.168.10.11 netmask 255.255.255.0 up</pre><p>This assigns the IP address 192.168.10.11 on metasploitable.</p><p><strong><em>Step 2: Tools installation.</em></strong></p><p>Make sure that all necessary tools are installed i.e. dsniff and wireshark.</p><p><strong><em>dsniff — </em></strong>this is a collection of powerful tools used in network auditing as well as penetration testing. It is widely used by ethical hackers and penetration testers.</p><p><strong><em>Wireshark — </em></strong>wireshark is an opensource network protocol analyzer that lets you capture and inspect packets in real time.</p><p>Inorder to install both tools, run the commands below on your attack machine;</p><pre>sudo apt update<br>sudo apt install dsniff wireshark</pre><p><strong><em>Step 3: Enable IP Forwarding</em></strong></p><p><strong><em>IP fowarding — </em></strong>Also refered to as <strong><em>packet forwarding</em></strong> is a computer networking feature which allows a device such as a router or a computer to pass network traffic from one network to another. To enable this feature, we run the following command on the atttacker machine in order to allow traffic fowarding.</p><pre>sudo sysctl -w net.ipv4.ip_forward=1</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*y8eADJ63lU4aUJjSDkdw_Q.png" /><figcaption><em>Enable IP forwarding on attacker machine</em></figcaption></figure><p><strong><em>Step 4: Launch Wireshark</em></strong></p><p>Open Wireshark on the attacker machine and start capturing traffic on the correct interface. If using bodhi linux, the correct ethernet interface is enp0s3. Enter the command below from the terminal to launch wireshark.</p><pre>sudo wireshark </pre><p><strong><em>Step 5: Perform ARP spoofing</em></strong></p><p>In this step, we perform the actual arp spoof. Remember in arp spoofing, the attacker convinces the victim that the IP address it’s trying to communicate with is associated with the attackers MAC address and the IP-MAC address pair is stored in the victim’s ARP table. From the attackers virtual machine, we run the commands below from the terminal:</p><pre>sudo arpspoof -i enp0s3 -t 192.168.10.11 192.168.10.1</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*Xg9AuF8J1nuZjEvpCAQ3-w.png" /></figure><p>Here, we are telling the victim <strong>“<em>Hey the gateway 192.168.10.1 is at my MAC”</em></strong></p><p>Again, run the command below still on the attackers terminal:</p><pre>sudo arpspoof -i enp0s3 -t 192.168.10.1 192.168.10.11</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/877/1*_6KLHvroURc3UCV9yIwhZw.png" /></figure><p>Again, here we are telling the gateway/router,<strong> “<em>Hey, the victim 192.168.10.11 is at my MAC too.”</em></strong></p><p><strong><em>Note that in our current setup, we dont have a gateway or router setup, so we are assuming a gateway/router address of 192.168.10.1 for the purpose of demonstration. However, feel free to add a third virtual machine, and linux distro, add it to the internal network and assign a static IP address and let it serve as your gateway/router.</em></strong></p><p>Once the commands are run successfully, all traffic destined to the gateway/router from the victim will be directed to the attackers MAC address.</p><p><strong><em>Step 6: Open Wireshark and view ARP traffic.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*arCxOxQaSpw0vmV4yI6p5w.png" /><figcaption>ARP request</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iSVhDf3f7VSTUrr6LL6mwg.png" /><figcaption>ARP reply unicast</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*stRq13jwVVud0Tyzc2EEdg.png" /><figcaption>ATTACKER MAC Address.</figcaption></figure><p>From the images above, note the attacker’s MAC address is 08:00:27:10:1E:65. Similarly, from the wireshark window <strong><em>ARP reply unicast</em></strong> screenshot above, note that the gateway address 192.168.10.1 is at the same MAC address (the Attacker’s MAC address) implying that we have successfully done the spoof. This means that all traffic destined to the gateway address will be directed to the attacker’s machine.</p><p>Also, from the victim’s machine, we can view the ARP Table using the command below on metasploitable:</p><pre>arp -a</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/1*ispdr2MW8BSK44qz3yh2tA.png" /></figure><p>Again, we see that the gateway MAC address is associated with the Attacker’s MAC address.</p><p><strong><em>Conclusion.</em></strong></p><p>In this lab activity, we have demonstrated one of the simplest yet effective attack vectors in local area networks. Understanding the concept of ARP spoofing not only equips you with an attacker’s perspective but also a defenders perspective which is crucial for any cybersecurity specialist. In the next lab activity, we will see how we mitigate or stop the spoof.</p><p><strong>NOTE:</strong></p><p><strong>This lab activity should and must be carried out in a controlled environment at all times. Carrying out the Lab in an unauthorised network can have legal consequences while also interefere with network functionalities.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=64e0057857bf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How FTP Exposes Your Data — a Wireshark Demo.]]></title>
            <link>https://medium.com/@Cyrus_M/how-ftp-exposes-your-data-a-wireshark-demo-9e01f99eb492?source=rss-cc64ac293a8------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e01f99eb492</guid>
            <category><![CDATA[cybersecurity-training]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[cybersecurity-awareness]]></category>
            <dc:creator><![CDATA[Cyrus Mutua]]></dc:creator>
            <pubDate>Thu, 10 Jul 2025 21:03:33 GMT</pubDate>
            <atom:updated>2025-07-10T21:03:33.730Z</atom:updated>
            <content:encoded><![CDATA[<h3>How FTP Exposes Your Data — a Wireshark Demo.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/754/1*yfyncn-QmT4s-hKvZUO6eA.png" /><figcaption>Image courtesy of: <a href="https://www.makeuseof.com/">https://www.makeuseof.com/</a></figcaption></figure><p><strong><em>Introduction.</em></strong></p><p>The <strong><em>File Transfer Protocol</em></strong> commonly abbreviated as <strong><em>FTP</em></strong>, is a standard networking protocol used for transferring files between two computers. One of the computers usually the end user is referred to as the <strong><em>localhost</em></strong> while the second computer is called the <strong><em>remote user</em></strong>, usually the <strong><em>FTP server</em></strong>. In order to transmit files effectively, both computers must be connected through a network and properly configured to transfer files over FTP. The File Transfer Protocol, operates in two ports, port 20 where the real file transfer occurs and port 21 where commands are issued. Files transferred using FTP are unencrypted making it an insecure file transfer protocol.</p><p>In this lab, we are going to demonstrate how insecure protocols such as FTP transmit data including usernames and passwords in plain text by analyzing FTP traffic using Wireshark. We will connect to an FTP server hosted on a metasploitable virtual machine and perform basic file operations while capturing traffic using Wireshark.</p><p><strong><em>Lab Requirements.</em></strong></p><ol><li>VirtualBox.</li><li>Two Virtual Machines (Bodhi Linux/any Linux Distro, Metasploitable)</li><li>FTP Server running on Metasploitable (default port 21).</li><li>Wireshark installed on the client machine. (Bodhi Linux)</li><li>Internal network configuration between Virtual Machines.</li><li>Test files.</li></ol><p><strong><em>Lab Instructions/Steps.</em></strong></p><p><strong><em>Step 1: Start both Virtual Machines.</em></strong></p><p>The first step is to launch VirtualBox and start our Virtual Machines. This lab assumes that we already have our virtual machines installed. Also, the Virtual Machines should be on the same network. For virtual machine installation and internal network configuration guide, refer to this <a href="https://medium.com/@Cyrus_M/lab-activity-secure-vs-insecure-ports-telnet-vs-ssh-b5a386f847ec">link</a> from a previous lab for a step by step guide.</p><p><strong><em>Step 2: Create Files to Upload/Download.</em></strong></p><p>Open the terminal on the client machine and create two files which are going to be our sample upload files. Type the following commands in order to create the files.</p><pre>echo &quot;This is a test file for FTP upload demonstration&quot;&gt;notes.txt<br>echo &quot;username=admin password=123456&quot;&gt;credentials.txt</pre><p>The commands above creates two files namely notes.txt and credentials.txt on the client machines with the information in quotes.</p><p>Similarly, from the metasploitable virtual machine which acts as our FTP server, we create a file which we will use as our sample download file. Again, key in the command below from the command line interface.</p><pre>echo &quot;This is a sample download file located on the ftp server&quot;&gt;sample.txt</pre><p>The command creates a file named sample.txt on the metasploitable virtual machine.</p><p><strong><em>Step 3: Ensure that FTP Server service is installed on the FTP Server.</em></strong></p><p>The FTP Server service is usually pre-installed in metasploitable. However, if using any other Linux distro, as your FTP Server or if the FTP Server service is not installed, run the following commands from the FTP Server terminal.</p><pre>sudo apt update<br>sudo apt vsftpd</pre><p><strong><em>Step 4: Start Wireshark and begin capture.</em></strong></p><p>Launch Wireshark from the client machine, select the correct interface and apply a filter to capture only FTP traffic. We assume Wireshark is installed on the client machine. In the filter label from the Wireshark interface, key in <strong><em>tcp.port==21 </em></strong>to apply the filter then start capturing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*hS2KrqLUAUVwzWkQYi2P9g.png" /></figure><p><strong><em>Step 5: Assign manual IP addresses to your virtual machines.</em></strong></p><p>Both virtual machines should be on the same network. We are going to assign the IP address 192.168.10.10 to the metasploitable virtual machine and 192.168.10.11 to the Linux virtual machine. Type the commands below on the terminal of each virtual machine to assign an IP address to each respectively.</p><pre>sudo ifconfig eth0 192.168.10.10 netmask 255.255.255.0 up<br>sudo ifconfig enp0s3 192.168.10.11 netmask 255.255.255.0 up</pre><p><strong><em>Step 6: Connect to the ftp server and login.</em></strong></p><p>To now connect to the ftp server, we type the command below on the terminal.</p><pre>ftp 192.168.10.10</pre><p>Type in the username and password once prompted. In our case, the username and password are <strong><em>msfadmin</em></strong> and <strong><em>msfadmin</em></strong> respectively. Note that we are using the metasploitable virtual machine as our ftp server hence we use the metasploitable login credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*EBDXulBM_eqcNJK_PlTqkQ.png" /></figure><p>You are now connected to the ftp server. You can use the<strong><em> </em></strong>ls command to view the files available on the ftp server.</p><p><strong><em>Step 7: Analyze network traffic on Wireshark.</em></strong></p><p>Open the Wireshark window and view capture traffic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VO3k_B24rN8z7wgTh_iuqw.png" /></figure><p>Note that from the image above, your data packets are transmitted in plain readable text. Similarly, we are able to view the login credentials used to connect to the ftp server.</p><p>We can go ahead and view the TCP stream which gives a general overview of every activity that has taken place during transmission. To view the TCP stream, right click on any of the packets, then click on follow &gt; tcp stream.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/621/1*TAfk00agBvOloxEtDZmAdA.png" /></figure><p>Again, from the tcp stream, the username and password of the ftp server are transmitted in plain text and are clearly readable.</p><p><strong>Conclusion.</strong></p><p>In this lab, we demonstrated how the File Transfer Protocol exposes our data. Just like many insecure protocols, FTP transmits data in plain text. When used for file transfer between two computers, one acting as the ftp server, data packets can be captured using a powerful protocol analyzer like Wireshark as demonstrated in this Lab. Wireshark, a commonly used network protocol analyzer was able to capture actual data packets during transmission and display their contents in plain text. Inorder to solve, this, it is advisable to use secure file transfer protocols such as the Secure File Transfer Protocol or File Transfer Protocol Secure where data packets are encrypted during transmission making it impossible for network protocol analyzers to display actual data packets in plain text. Instead, protocol analyzers are only able to show the cipher text which can be hard to crack.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e01f99eb492" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lab Activity: Secure vs Insecure Ports (Telnet vs SSH)]]></title>
            <link>https://medium.com/@Cyrus_M/lab-activity-secure-vs-insecure-ports-telnet-vs-ssh-b5a386f847ec?source=rss-cc64ac293a8------2</link>
            <guid isPermaLink="false">https://medium.com/p/b5a386f847ec</guid>
            <category><![CDATA[cyber-security-awareness]]></category>
            <category><![CDATA[skills-development]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Cyrus Mutua]]></dc:creator>
            <pubDate>Thu, 03 Jul 2025 10:12:21 GMT</pubDate>
            <atom:updated>2025-07-03T10:12:21.139Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*kfJLH9-lhq_E3N3Zia3Y6g.png" /><figcaption>photo credit: unsplash.com</figcaption></figure><p><strong>Lab Objectives.</strong></p><p><em>To practically demonstrate the difference between S</em><strong><em>ecure</em></strong><em> and </em><strong><em>Insecure</em></strong><em> protocols by capturing and analyzing network traffic using wireshark.</em></p><p><strong>Lab Requirements.</strong></p><ol><li>VirtualBox.</li><li>Two Virtual machines. (Server and Client machine)</li><li>Wireshark installed on the client machine.</li><li>Telnet Server (for port 23) and SSH server (for port 22) installed on the server.</li><li>Internet access.</li><li>Login test credentials.</li></ol><p><strong>Introduction</strong></p><p>In this lab activity, we explore the difference between Secure and Insecure ports by capturing and analyzing network traffic using Wireshark. We will be using two virtual machines, metasploitable as the server and a Linux machine acting as the client machine running on VirtualBox as the virtualization software.</p><p>For this lab, the Linux distro used is bodhi linux, a lightweight Linux operating system which can be installed on any computer with limited resources. However, any Linux distro is suitable for use in this lab.</p><p>Metasploitable is a Linux virtual machine which is designed to be intentionally vulnerable and is suitable for learning purposes.</p><p><strong>Steps and Instructions</strong></p><p><strong><em>Step 1 — Install VirtualBox</em></strong></p><p>VirtualBox can be downloaded for both Linux and Windows hosts from their official website <a href="https://www.virtualbox.org/wiki/Downloads"><strong><em>https://www.virtualbox.org/wiki/Downloads</em></strong></a></p><p><strong><em>Step 2— Install virtual machines.</em></strong></p><p>Open Virtualbox and Install both Virtual machines.</p><p>Download metasploitable and bodhi linux from the following websites respectively:- <a href="https://sourceforge.net/projects/metasploitable/files/latest/download"><strong><em>https://sourceforge.net/projects/metasploitable/files/latest/download</em></strong></a><strong><em> </em></strong>and <a href="https://www.bodhilinux.com/download/"><strong><em>https://www.bodhilinux.com/download/</em></strong></a></p><p><strong><em>Step 3: Configure networking.</em></strong></p><p>This step involves creating an internal network comprising of both virtual machines. Both virtual machines must be able to communicate with each other which can be verified using the ping command. In order to create an internal network,</p><p>Click on the metaspoitable virtual machine, and choose settings. For my metaspoitable virtual machine, i have named it as <em>met</em> as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*WCzdMnigxzfHAdqG2Y-Q-g.png" /></figure><p>Click on <strong><em>Network</em></strong> from the dialogue box which appears, choose <strong><em>adapter 1</em></strong> then select <strong><em>attached to</em></strong> internal network option. Make sure to select <strong><em>Enable Network Adapter. </em></strong>Similarly, assign a name to the internal network like shown below. The name of my internal network is<strong><em> intnet.</em></strong></p><p>Repeat the same for the Linux virtual machine, making sure that they share the same internal network.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/655/1*Yke04KmwujgZ9SQbIT7Ltg.png" /></figure><p><strong><em>Step 4: Enable internet access by the virtual machines.</em></strong></p><p>In order to grant internet access to the virtual machines, the host machine must be connected to the internet. Once connected to the internet, follow the following steps:</p><p>Click on the metaspoitable virtual machine, go to <strong><em>settings</em></strong> then choose N<strong><em>etwork</em></strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/655/1*Yke04KmwujgZ9SQbIT7Ltg.png" /></figure><p>Choose <strong><em>Adapter 2 </em></strong>and select <strong><em>Enable Network Adapter </em></strong>then choose attached to <strong><em>NAT</em></strong> from the options.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/661/1*YFEj6YktfbQur6ojp408EA.png" /></figure><p>Repeat the same for the Linux virtual machine.</p><p><strong><em>Step 5: Start the virtual machines.</em></strong></p><p>For this step, click on the metasploitable virtual machine and choose <strong><em>Start</em></strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/646/1*mdCcUxdS4EBt2jchxvdf3g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*SLdcYgxaH9ysuBGctyTBgw.png" /><figcaption>Sample image of metasploitable booting up.</figcaption></figure><p>Once metasploitable boots up, you will be prompted to enter the login credentials. Use <strong><em>msfadmin</em></strong> as the <strong>username</strong> and <strong><em>msfadmin</em></strong> as the <strong>password</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/732/1*QCYiNEnZRIwgucGYBSNfkQ.png" /><figcaption>Metasploitable login window.</figcaption></figure><p>On entering the correct login credentials, your login window should appear as in the image below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/729/1*4D9VjvgQ5lk5jEniMy-TkQ.png" /></figure><p>Repeat the same for the Linux virtual machine. Click on the virtual machine, then choose <strong><em>Start</em></strong>.</p><p><strong><em>Step 6: Assign manual IP addresses to the virtual machines from the terminal.</em></strong></p><p>From the metasploitable virtual machine, follow the following steps to assign an IP address to the virtual machine.</p><p><strong><em>Type the command below to identify the correct interface to assign an IP address.</em></strong></p><pre>sudo ifconfig</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*zKE4bS2VESIBpzMyAFsVWg.png" /></figure><p>From the above image, the correct Ethernet interface to assign an IP address is <strong><em>eth0</em></strong>.</p><p><strong><em>Assign an IP address.</em></strong></p><p>Key in the following command to assign an IP address.</p><pre>sudo ifconfig eth0 192.168.10.10 netmask 255.255.255.0 up</pre><p>The above command assigns the IP address 192.168.10.10 to the metaspolitable virtual machine.</p><p><strong><em>Repeat the same for the Linux virtual machine.</em></strong></p><p>Launch the <strong><em>terminal/terminology</em></strong>(for bodhi linux). Type the command to identify the correct interface to assign an IP address.</p><pre>ifconfig</pre><p>For my Linux machine, the Ethernet interface is enp0s3 as shown in the image below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*n5fRJS_1XYhlgz7ulWo-0g.png" /></figure><p>Assign an IP address using the command below.</p><pre>ifconfig enp0s3 192.168.10.11 netmask 255.255.255.0 up</pre><p>The command above assigns the IP address 192.168.10.11 to the Linux virtual machine.</p><p><strong><em>Step 7: Test connectivity.</em></strong></p><p>For this step, we ensure that both virtual machines can communicate with each other using the ping command.</p><p>From the Linux virtual machine, ping the IP address of the metasploitable virtual machine using the command below from the terminal.</p><pre>ping -c 4 192.168.10.10</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*HyDCBrgVX35kL5YXPK-vmg.png" /></figure><p>From the image above, the total packet loss is 0% which means the two virtual machines are communicating.</p><p><strong><em>Step 8: Install Wireshark on the Linux Virtual machine.</em></strong></p><p>Wireshark is an open-source and free to use tool used for capturing and inspecting network traffic. It is able to give an overview of what is happening in a network in a detailed manner. Wireshark is widely used in troubleshooting network issues, network protocol analysis and ensuring network security.</p><p>Wireshark can be installed directly from the terminal in any Linux machine. It can also be downloaded from their official website <a href="https://www.wireshark.org/download.html"><strong><em>https://www.wireshark.org/download.html</em></strong></a><strong><em> </em></strong>for windows hosts.</p><p>To install Wireshark in our Linux virtual machine, we run the command below on the terminal.</p><pre>sudo apt install wireshark</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/1*9xmGpSmRc4qp1MaaMVMSKg.png" /></figure><p>In my case, Wireshark is already installed on my Linux virtual machine.</p><p><strong><em>Step 9: Install telnet on the client machine (the Linux virtual machine)</em></strong></p><p>Telnet is an insecure network protocol which enables remote communication between two computers. It allows one machine to connect to another machine remotely through the command line interface.</p><p>To install telnet on the client machine (Linux virtual machine), run the following command on the terminal.</p><pre>sudo apt install telnetd</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/677/1*qY_4caT-cdmYAYxAYuwuHw.png" /></figure><p><strong><em>Step 10: Launch Wireshark from the client machine using the terminal.</em></strong></p><p>Run the command below to launch Wireshark on the Linux virtual machine.</p><pre>sudo wireshark</pre><p>Once Wireshark is launched, start capturing network traffic from the available interfaces, identify the correct interface for your machine to start capturing network traffic. In this case, the correct interface is <strong><em>enp0s3</em></strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*fSzitJOcITcnmFaB7MHbXA.png" /></figure><p>Start capturing traffic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/1*FKlhx3fKTRQWuaLlymB3hw.png" /></figure><p><strong><em>Step 11: Connect to the metasploitable virtual machine from the Linux machine using telnet.</em></strong></p><p>To connect to the metasploitable virtual machine from the Linux machine, we run the following command from the Linux machine terminal.</p><pre>telnet 192.168.10.10</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/1*hoI08f4XH_XWL5WwCUyAUQ.png" /></figure><p>Enter the login credentials for metaspoitable. The username is <strong><em>msfadmin</em></strong> password: <strong><em>msfadmin</em></strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/679/1*e5vmkjzf6oDHGXNxyM8BbA.png" /></figure><p>You are now connected to the metasploitable virtual machine remotely. Once connected, go back to Wireshark and stop capturing traffic then filter telnet traffic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/673/1*U7bBHipdkILqwd80MMvasQ.png" /></figure><p>Right click on any of the packets, choose <strong><em>follow</em></strong> then select <strong><em>tcp stream</em></strong>. You should be able to see how your packet data is transmitted in plain text including any login credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*b9zJ7zIVYIh5qKF0uemvKg.png" /></figure><p><strong><em>Step 12: Install Secure shell(SSH) server on the client machine.</em></strong></p><p>For this step, we install Secure Shell(SSH) on the client machine(the Linux virtual machine). Secure Shell is a protocol which runs on port 22 and allows a user to access another machine remotely in a secure manner. While using the SSH protocol for remote access, data packets in transit are usually encrypted.</p><p>To install SSH server, launch a new terminal from the Linux virtual machine, and run the following command.</p><pre>sudo apt install openssh-server</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/1*Ecm1MPk7AwCYS6X6dyIa2A.png" /></figure><p>Open a new terminal, and connect to the metasploitable virtual machine using the command below. Enter the metasploitable password <strong><em>msfadmin </em></strong>when prompted.</p><pre>ssh msfadmin@192.168.10.10 </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/1*xI_TixRRFXj_YLVcdTKOVQ.png" /></figure><p>Once you have gained remote access to the metasploitable machine using the SSH protocol, go back to the Wireshark window and filter <strong><em>SSH</em></strong> traffic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/971/1*TGOQE8yZJA4V3gDPv8t21A.png" /></figure><p>Right click on any of the packets, choose <strong><em>follow</em></strong> then <strong><em>TCP stream</em></strong>. From the dialogue box that appears, notice how data packets are encrypted during transmission while using SSH unlike in Telnet, where packet data are transmitted in plain text.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*lFeFZ_3L6pmexRLFB-Dd_g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*8CvMHum2bCnRnWWQLjjtBg.png" /></figure><p><strong>Conclusion.</strong></p><p>This lab activity perfectly demonstrated the main difference between using secure and insecure protocols for communication. We were able to compare two remote access protocols, Telnet and SSH. Using telnet protocol for remote access, we were able to see how sensitive information such as usernames and passwords are transmitted in plain text and can easily be intercepted using traffic analysis tools such as Wireshark.</p><p>In contrast, when using SSH, which is a secure protocol for remote access, all traffic including usernames and passwords were encrypted, preventing packet sniffers such as Wireshark from revealing any readable data.</p><p>Secure communication protocols are vital in the real world. From this lab, it is evident how Insecure communication protocols are risky to use and how they can easily be exploited in a cyber attack.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b5a386f847ec" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Safeguarding Your Kubernetes Cluster: Best Practices for Security and Compliance.]]></title>
            <link>https://medium.com/@Cyrus_M/safeguarding-your-kubernetes-cluster-best-practices-for-security-and-compliance-fed8afaad35b?source=rss-cc64ac293a8------2</link>
            <guid isPermaLink="false">https://medium.com/p/fed8afaad35b</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[kubernetes-security]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[kubernetes-cluster]]></category>
            <dc:creator><![CDATA[Cyrus Mutua]]></dc:creator>
            <pubDate>Fri, 24 Feb 2023 13:25:48 GMT</pubDate>
            <atom:updated>2023-02-24T13:25:48.497Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*z-YfDQhxv8hr6vnXNtV5Lg.png" /><figcaption>photo credit: <a href="https://platform9.com/wp-content/uploads/2019/10/kubernetes-security.png">https://platform9.com/wp-content/uploads/2019/10/kubernetes-security.png</a></figcaption></figure><p>While Kubernetes is a vey powerful container orchestration tool that is very helpful to individuals and organizations who wish to deploy and manage containerized applications at scale, it is important to have security and compliance in mind while using Kubernetes just like any other technological product. In this article, you will explore some of the best practices for securing as well as complying with regulatory requirements while using Kubernetes.</p><p><strong>Security Best Practices.</strong></p><ol><li><strong><em>The Principle of Least Privilege.</em></strong></li></ol><p>The principle of less privilege abbreviated as PoLP and also referred to as the principal of minimal privilege is a very common defensive strategy in the software development world. In Kubernetes, the principle of least privilege entails giving users as well as processes very minimal permissions that are required to complete their tasks. This helps in limiting access to sensitive resources thus reducing the risk of unauthorized access and data breaches.</p><p><strong><em>2. Keep Kubernetes up to date.</em></strong></p><p>Given that Kubernetes is a very fast moving product with new releases being released frequently, it is very important to ensure that your Kubernetes cluster is up to date with the latest security patches as well as bug fixes. This helps in ensuring that any security vulnerabilities that may be in the platform are quickly patched thus reducing the risk of security breaches.</p><p><strong><em>3. Encrypt data in transit and at rest.</em></strong></p><p><strong><em>Data in transit</em></strong> refers to data that is actively being moved from one location to another either across the internet or through a private network while <strong><em>data at rest</em></strong> refers to data that is inactive or rather not actively moving from one location to another or from network to network and can be data stored on a hard drive, flash drive or any other storage method.</p><p>Ensuring that data in transit and data at rest is encrypted is usually a big step towards protecting sensitive data. Kubernetes provides an inbuilt support that assists in encrypting data in transit using TLS (Transport Layer Security) while also supports the use of external tools to encrypt data at rest.</p><p><strong><em>4. Strong authentication and authorization.</em></strong></p><p>Various authentication and authorization mechanisms such as role-based access control (RBAC) and mutual TLS authentication are supported in Kubernetes. Role-based access control abbreviated as RBAC provides a mechanism for regulating computer and network resources access on the basis of the roles of individual users within your organization.</p><p>Mutual TLS authentication on the other hand is a authentication mechanism whereby two parties on both ends of a connection authenticate each other. It serves to ensure that parties at each end of the connection are who they claim they are.</p><p>These two mechanisms ensure that only authorized users and processes can access your Kubernetes Resources.</p><p><strong><em>5. Use network segmentation.</em></strong></p><p>Network segmentation in Kubernetes entails dividing your Kubernetes cluster network into multiple isolated segments or subnetworks with the sole purpose of minimizing the impact of security incidents as well as reducing the attack surface of your Kubernetes cluster. Network segmentation helps in preventing unauthorized access to any sensitive resources within your cluster and helps in the mitigation and containment of the impact of security incidents such as a compromised node or pod.</p><p>In Kubernetes, network segmentation can be implemented using network policies which basically are Kubernetes objects that define how traffic is allowed to flow between pods and services within a cluster.</p><p><strong><em>6. Monitor your Kubernetes Cluster.</em></strong></p><p>Monitoring your Kubernetes cluster can play a critical role in detecting and responding to security incidences more quickly. Kubernetes offers native monitoring tools such as Prometheus and Grafana that can greatly assist you monitor your cluster. Similarly, it is good to consider using a centralized logging solution in order to aggregate logs from all your Kubernetes nodes.</p><p><strong><em>7. Comply with regulatory requirements.</em></strong></p><p>Regulatory requirements may vary depending on your geopolitical region. Therefore, if you are subject to regulatory requirements, it is really important to ensure that your Kubernetes cluster is compliant by following best practices for securing and protecting data.</p><p><strong>Summary.</strong></p><p>By using the security best practices discussed in this article, you can ensure that your Kubernetes cluster is secure as well as compliant with regulatory requirements. It is important to note that compliance and security are ongoing processes and thus it is your duty to make sure that you continually monitor and update your Kubernetes configuration to stay ahead of emerging threats as well as regulatory requirements.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fed8afaad35b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kubernetes: Strategies for Managing Kubernetes Resources such as Pods, Services and Ingress.]]></title>
            <link>https://medium.com/@Cyrus_M/kubernetes-strategies-for-managing-kubernetes-resources-such-as-pods-services-and-ingress-9c138e55d4cf?source=rss-cc64ac293a8------2</link>
            <guid isPermaLink="false">https://medium.com/p/9c138e55d4cf</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[kubernetes-operator]]></category>
            <category><![CDATA[kubernetes-cluster]]></category>
            <dc:creator><![CDATA[Cyrus Mutua]]></dc:creator>
            <pubDate>Mon, 20 Feb 2023 08:33:48 GMT</pubDate>
            <atom:updated>2023-02-20T08:33:48.345Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sD0LKJ3JeGZ-2AQT7HjdSg.png" /></figure><p>Kubernetes is a very powerful container orchestration tool that contains a very rich set of resources that can be used in the management of containerized applications. Some of the key resources that are used to manage containerized applications include pods, services and ingress.</p><p>A <strong><em>pod(s)</em></strong> is the smallest deployable unit in Kubernetes and can be made up of one or more containers.</p><p><strong><em>Services</em></strong><em> </em>serve the sole purpose of exposing pods to other pods or even to external clients.</p><p><strong><em>Ingress</em></strong><em> </em>on the other hand exposes HTTP and HTTPS routes to services within a Kubernetes cluster.</p><p>As Kubernetes clusters continue to grow in size as well as in complexity, the management and organization of your Kubernetes resources becomes an uphill task. Therefore, it is quite important to implement strategies that help you effectively manage and organize your resources in Kubernetes. Kubernetes comprises of a variety of strategies to help you manage your resources effectively. Some of these strategies are discussed below.</p><p><strong>Strategies for Managing Kubernetes Resources.</strong></p><ol><li><strong><em>Namespaces.</em></strong></li></ol><p>Namespaces make it possible to isolate a group(s) of resources within a Kubernetes cluster. Namespaces are responsible for the division of cluster resources in cases where there are multiple users, teams or even applications. In Kubernetes, namespaces can be created and resources assigned to those namespaces. Resources can then be managed and monitored within the context of those namespaces.</p><p><strong>Common use cases of Namespaces.</strong></p><p><em>Multi-tenancy</em></p><p>Namespaces can be used in scenarios where there are multiple teams or applications that are sharing a single Kubernetes Cluster. In this case, namespaces are used to isolate their resources thus preventing conflicts. Namespaces also provide a way to set resource limits and quotas.</p><p><em>Separation of different environments.</em></p><p>Development, testing and production environment resources can be separated through the use of namespaces. This prevents the accidental deployment of a resource(s) to the wrong environment.</p><p><em>Resource Management.</em></p><p>Resources can be deployed to a specific application or microservice through the use of namespaces. This makes it possible to organize as well as monitor resources more easily.</p><p><strong><em>2. Labels.</em></strong></p><p>Labels in Kubernetes are key-value pairs that can be attached to objects including pods, services and deployments. Labels provide a powerful way in which you can organize, select and manage your resources in a Kubernetes cluster.</p><p>Resources in Kubernetes can be grouped according to a particular characteristic such as the environment (production, development or testing) that they belong to or to the application that they belong to. On labeling your resources, you can use Kubernetes commands and tools to perform operations on the labelled resources. For instance, the command below lists all resources with the specific label <em>app:nginx.</em></p><pre>kubectl get pods -l app=nginx</pre><p><strong><em>3. Resource Quotas</em></strong></p><p>Resource quotas in Kubernetes are used to set resource usage limit for every namespace and are used in situations where there are multiple users or teams sharing a cluster which has a fixed number of nodes. Resource quotas ensure that there is no runaway resource usage and makes sure that your cluster remains stable as well as performant.</p><p>It is possible to limit the amount of objects that can be created in a namespace by the type as well as the compute resources that can be consumed by resources in the namespace using resource quotas.</p><p><strong><em>4. Ingress Controllers.</em></strong></p><p>Ingress controllers help in managing external access to services in a cluster. Ingress controllers allow you to route traffic to the desired or rather appropriate service by using URL paths, hostnames or any other defined criteria.</p><p><strong><em>5. Service discovery.</em></strong></p><p>Service discovery makes it possible for services within a cluster to find each other without the need for setting up endpoints or hard coding IP addresses for communication. Remember that the IP addresses assigned to pods are subject to change anytime as pods are destroyed and others created when needed. Similarly, when a pod is moved to a new node, any connection based on its internal IP address cannot be used to access the pod hence the need for a way for pods to communicate seamlessly.</p><p><strong><em>6. Kubernetes Operators.</em></strong></p><p>Kubernetes operators are software extensions that use custom resources to manage applications together with their components in Kubernetes. Kubernetes operators makes it possible to automate complex processes and ensures that your resources are always in the desired state. This can help greatly in improving the reliability as well as availability of your cluster as well as reduce the amount of human intervention needed to manage your resources.</p><p><strong>Summary.</strong></p><p>Managing resources in a Kubernetes cluster can be a really challenging task if the right strategies are not used. There are many strategies that can be employed in order to manage your Kubernetes cluster effectively as discussed in this article. By utilizing the strategies discussed in this article, you can simplify the management of Kubernetes resources such as pods, services and ingress regardless of whether you are managing a small or a large Kubernetes cluster. These strategies ensure can assist in making sure that your resources are highly available, performant as well as secure.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9c138e55d4cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kubernetes: Deploying and scaling applications on minikube using Kubernetes manifests — nginx web…]]></title>
            <link>https://medium.com/@Cyrus_M/kubernetes-deploying-and-scaling-applications-on-minikube-using-kubernetes-manifests-nginx-web-c32b6d4c7520?source=rss-cc64ac293a8------2</link>
            <guid isPermaLink="false">https://medium.com/p/c32b6d4c7520</guid>
            <category><![CDATA[kubernetes-engine]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[kubernetes-cluster]]></category>
            <category><![CDATA[deployment]]></category>
            <dc:creator><![CDATA[Cyrus Mutua]]></dc:creator>
            <pubDate>Tue, 14 Feb 2023 10:04:45 GMT</pubDate>
            <atom:updated>2023-02-14T10:08:31.646Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/484/1*ylQQ6beZwan5biID57mVCw.png" /></figure><h3><strong>Kubernetes: Deploying and scaling applications on minikube using Kubernetes manifests — nginx web server deployment.</strong></h3><p>In my previous articles <a href="https://medium.com/p/1f96ae9576c8">Kubernetes: What it is, components and benefits</a> and <a href="https://medium.com/p/75f8feeb5ed6">Kubernetes: Running your first Kubernetes Cluster in your local machine using minikube</a>, I introduced Kubernetes and its various features as well as walked you through creating your first single node Kubernetes cluster using minikube. In this article, I am going to walk you through deploying and scaling your first application in minikube using Kubernetes manifests. It is important to note that there are different tools that can be used to deploy your application in Kubernetes. Some of the ways you can deploy your applications in Kubernetes include: -</p><p><strong><em>Using Kubernetes Manifests.</em></strong></p><p>Kubernetes Manifests allows you to specify the desired state of your application through a set of key-value pairs called manifests which are in turn deployed into your Kubernetes cluster.</p><p><strong><em>Using Helm.</em></strong></p><p>Helm is a tool that is basically used for the managing packages that contain pre-configured Kubernetes resources. These packages are commonly referred to as Helm charts.</p><p><strong><em>Dashboard.</em></strong></p><p>This is a web based graphical user interface that enables you to deploy your containerized applications to Kubernetes cluster. Similarly, the dashboard allows for trouble shooting as well as the management of the Kubernetes cluster and its resources.</p><p><strong><em>Kompose.</em></strong></p><p>Kompose comes in handy for Docker Compose users who plan to migrate to Kubernetes. Kompose helps in the translation of docker compose files into Kubernetes Objects as well as the migration from local docker development environment to Kubernetes.</p><p><strong><em>Kui.</em></strong></p><p>This is a graphical user interface-based tool that converts your kubectl command line requests to graphical format. It allows you to be able to click through various resources in your Kubernetes cluster using a tabular user interface.</p><p>There are many other tools that enable you to interact with your Kubernetes cluster as well as deploy your applications in Kubernetes. In this article, my focus will be to show you how to deploy your application to a Kubernetes cluster using Kubernetes manifests files. You are going to deploy a nginx web server to Kubernetes using a manifest file, scale your deployment and expose your service so that it is accessible from a web browser. This article assumes that you have minikube installed and running in your local machine.</p><p><strong>What is a deployment?</strong></p><p>Before defining a deployment, I would like to define a few terms you may come across often: -</p><p><strong><em>Pod.</em></strong></p><p>A pod is the smallest deployable computing unit that can be created and managed in Kubernetes. It comprises of one or more containers with a shared storage as well as network resources. A pod also contains a specification on how the containers are run.</p><p><strong><em>ReplicaSet.</em></strong></p><p>A ReplicaSet makes sure that a specified number of replica pods are up and running at any given time. ReplicaSets give guarantee of the availability of specified number of identical pods.</p><p>A deployment provides a declarative update for pods as well as ReplicaSets. A deployment can be used to create new ReplicaSets or even to remove existing deployments while adopting their resources for new deployments.</p><p><strong><em>Service</em></strong></p><p>A service in Kubernetes allows you to expose your application that is running on a set of pods as a network service. It defines a policy by which you can access your pods while the targeted pods are usually determined by a selector. There are four different types of service resources in Kubernetes namely: -</p><p><em>NodePort </em>— in a NodePort, a client sends their requests to the provided node IP address on the nodePort values specified by the service.</p><p><em>LoadBalancer — </em>here, a client sends their request to the IP address of a network load balancer.</p><p><em>ClusterIP — </em>This is usually set as the default service resource where requests are sent to a stable IP address.</p><p><em>ExternalName — </em>Allows only internal clients be able to use the DNS name of a service for an external DNS name.</p><p><em>HeadLess — </em>is preferred when you need grouping of pods but don’t require a stable IP address.</p><p>Different applications may need multiple resources to be created such as a deployment and a service. Management of these resources is made easier by grouping them together in Kubernetes manifests. You can create a single YAML manifest file to manage these resources and separate each using three dashes ( — -).</p><p><strong>Deploying your nginx web server</strong></p><p>In this tutorial, you are going to build two YAML manifests (a deployment manifest and a service manifest).</p><p><strong>Structure of a deployment manifest.</strong></p><p>Below is the structure of a deployment manifest. A deployment manifest consists of different sections which are discussed below.</p><pre>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: nginx-deployment<br>  labels:<br>    app: nginx<br>spec:<br>  replicas: 3<br>  selector:<br>    matchLabels:<br>      app: nginx<br>  template:<br>    metadata:<br>      labels:<br>        app: nginx<br>    spec:<br>      containers:<br>      - name: nginx<br>        image: nginx:1.14.2<br>        ports:<br>        - containerPort: 80</pre><p>From the above deployment manifest, you first begin by specifying the <em>kind. </em>In this case, the kind is a deployment.</p><p>At the <em>metadata </em>section under <em>name (.metadata.name field), </em>is where you specify the name of your deployment. In the above case, the name of the deployment is <em>nginx-deployment.</em></p><p>Under the <em>.spec.replicas </em>field, you specify the number of pod replicas that you want to create. In this case, three pod replicas are created. Still on this section under <em>.spec.selector </em>field, you define which pods to be managed by the replica sets. In this case under <em>.spec.selector.matchLabels, </em>you select the label that is defined in the pod template under <em>.spec.template </em>field in this case (app:nginx).</p><pre>spec:<br>  replicas: 3<br>  selector:<br>    matchLabels:<br>      app: nginx</pre><p>The <em>.spec.template </em>field contains a few subfields. These are:-</p><p><em>i. pod labels — </em>found under <em>.metadata.labels </em>field. In this case, the pods are labeled <em>app:nginx</em> as show below.</p><pre>template:<br>    metadata:<br>      labels:<br>        app: nginx</pre><p><em>ii. pod specifications — </em>here, you specify the name of your container in this case <em>nginx </em>as well as the container image version found at docker hub in this case <em>nginx: 1.14.2</em>. It is here where you will also specify the port in which your container image runs in this case nginx runs on port 80.</p><pre>spec:<br>      containers:<br>      - name: nginx<br>        image: nginx:1.14.2<br>        ports:<br>        - containerPort: 80</pre><p><strong>Structure of the service manifest.</strong></p><p>Below is the structure of a service YAML manifest.</p><pre>apiVersion: v1<br>kind: Service<br>metadata:<br>  name: nginx-service<br>  labels:<br>    app: nginx<br>spec:<br>  selector:<br>    app: nginx<br>  ports:<br>    - protocol: TCP<br>      port: 80<br>      targetPort: 80<br>  type: LoadBalancer</pre><p>Just like the deployment manifest, the service YAML manifest is similar but in this case the <em>kind </em>changes to <em>service </em>instead of <em>deployment. </em>You also give a name to your service under <em>.metadata.name </em>field, in this case <em>nginx-service. </em>Under the <em>.spec.label </em>and .<em>spec.selector </em>field, it should match the name of the label used in the deployment manifest which is <em>app:nginx. </em>As seen previously, there are different types of service resources, in this case, you have chosen the type of your service to be a NodeBalancer.</p><p>Remember that a kubernetes YAML manifest can be created using any text editor. Also, you can combine the deployment and service YAML manifests into a single file by separating them using three dashes ( — -) and deploying them as a single resource as seen below.</p><pre>apiVersion: v1<br>kind: Service<br>metadata:<br>  name: nginx-service<br>  labels:<br>    app: nginx<br>spec:<br>  selector:<br>    app: nginx<br>  ports:<br>    - protocol: TCP<br>      port: 80<br>      targetPort: 80<br>  type: LoadBalancer<br><br>---<br>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: nginx-deployment<br>  labels:<br>    app: nginx<br>spec:<br>  replicas: 3<br>  selector:<br>    matchLabels:<br>      app: nginx<br>  template:<br>    metadata:<br>      labels:<br>        app: nginx<br>    spec:<br>      containers:<br>      - name: nginx<br>        image: nginx:1.14.2<br>        ports:<br>        - containerPort: 80</pre><p>Now that you have prepared your manifests, it is time to apply them in Kubernetes using this procedure:-</p><p>i. Start minikube using <em>minikube start </em>command from your terminal and check the status using <em>minikube status.</em></p><pre>minikube start</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*a6v_3HSrwT11SO32O_e42g.png" /></figure><pre>minikube status</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/745/1*bch1EnAiY_nJkre-jdf1vg.png" /></figure><p>ii. Open any text editor from your terminal and paste your manifest file. In this case, i am going to deploy the manifests as a single resource. Run this command to open a text editor from your terminal. You can use any text editor of your choice.</p><pre>sudo nano deployment.yaml</pre><p>The command above creates a YAML file called deployment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*orQfHLOux9OhNl1iAJZgwg.png" /></figure><p>Copy and paste the deployment and service manifests as seen in the image above, hit ctrl + X to exit and press Y and enter to save your changes.</p><p>iii. The next step is to apply your configuration as described in your manifests in Kubernetes. To do so, enter the command below:-</p><pre>kubectl apply --filename deployment.yaml</pre><p>Note that <em>deployment.yaml </em>is the name given to your manifest.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*VJIgCHCgpLDI3ED4NUdXtg.png" /></figure><p>As seen above, a deployment and a service has been created.</p><p>You can get more information about your deployment and service by running the following commands:-</p><pre>kubectl get deployment</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*JIcrp8mOTDf4j_fEUAu_hQ.png" /></figure><p>From the image above, you are able to see the name of your deployment as well as the number of replica pods that are up and running in this case three as you specified in your deployment manifest.</p><pre>kubectl get services</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*nhcmBm7L-K6lwZyURmjlLg.png" /></figure><p>Similarly, you can view the services running in your cluster including the one your created together with the cluster IP address that was assigned.</p><p>iv. In order to expose your service especially of type <em>LoadBalancer </em>as you have used in this tutorial, you will use the <em>minikube tunnel </em>command. Note that the command should be run in a separate terminal so as to keep the load balancer running.</p><pre>minikube tunnel</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/484/1*5g6b9hYImllOo-GXJbURYw.png" /></figure><p>Once you run the <em>minikube tunnel </em>command from your terminal, you can now vie the external IP address of your service by typing the command:-</p><pre>kubectl get services</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*9YLJSEfshPRo1BedHOgrgQ.png" /></figure><p>Now you can see from the image above that the <em>nginx-service </em>that you created has been assigned an external IP address. Note that if you run the command <em>kubectl get services </em>without running the <em>minikube tunnel </em>command, the external IP address will appear as pending.</p><p>Now you can try the IP address from your web browser. From my end, i will key the below IP address in my web browser:-</p><pre>http://10.100.219.90:80</pre><p>iv. You can scale your deployment up or down using the simple command. The command scales the number of replica sets from three to five.</p><pre>kubectl scale deployments/nginx-deployment --replicas=5</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/673/1*mbtC9Hbap403Y4J1fCT-6Q.png" /></figure><p>If you enter the <em>kubectl get deployments </em>command now, you can see that our deployment has been scaled to five replica pods.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/677/1*0fVyTjL6e4XtlsMuNRmaGA.png" /></figure><p><strong>Conclusion.</strong></p><p>In this article, i introduced the various ways in which you can deploy your application in Kubernetes. You were able to deploy an nginx web server to Kubernetes from your local machine using Kubernetes manifest configuration files. You were also able to scale up your application replicas using one simple command from the terminal. It is important to note that as discussed earlier, there are various ways of deploying applications on Kubernetes which i am going to explain in other articles.</p><p>I hope you enjoyed reading my article.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c32b6d4c7520" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kubernetes: Running your first Kubernetes Cluster in your local machine using minikube.]]></title>
            <link>https://medium.com/@Cyrus_M/kubernetes-running-your-first-kubernetes-cluster-in-your-local-machine-using-minikube-75f8feeb5ed6?source=rss-cc64ac293a8------2</link>
            <guid isPermaLink="false">https://medium.com/p/75f8feeb5ed6</guid>
            <category><![CDATA[kubernetes-cluster]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Cyrus Mutua]]></dc:creator>
            <pubDate>Sat, 21 Jan 2023 12:59:56 GMT</pubDate>
            <atom:updated>2023-01-21T12:59:56.574Z</atom:updated>
            <content:encoded><![CDATA[<p>In my previous article, I introduced Kubernetes and gave an insight to the different capabilities of Kubernetes as well as its architecture. In this article, I will show you how you can run Kubernetes in your local machine by setting up a single node Kubernetes cluster using the minikube tool on a windows machine. Remember that Kubernetes can be run on a variety of platforms including on premises, hybrid platforms or through different cloud providers such as google cloud, amazon web services, Microsoft azure and many more. Minikube is a great tool when it comes to testing or learning Kubernetes as well as when developing applications locally. In order to use minikube, you first need to install it in your local machine. Minikube runs Kubernetes inside a virtual machine therefore a virtual machine manager needs to be installed in your local machine as well. In this article I am going to use VirtualBox as my virtual machine manager.</p><p><strong>Step 1: Installing Minikube</strong></p><p>i. Click on this <a href="https://minikube.sigs.k8s.io/docs/start/">link</a> to visit minikube download page from their website and scroll down the page to installation.</p><p>ii. Choose the operating system that you want to run minikube on and click on latest release to download the minikube executable file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/842/1*yASS6QjJUtX_eRZlO54p5w.jpeg" /></figure><p>N/B Minikube can be installed on a variety of operating systems including windows, macOS and any Linux distribution.</p><p>iii. Once your download is complete, double click on the executable file from your download location to begin the setup.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/839/1*LjtMy8UBv9fdkpN3QwKgTw.jpeg" /></figure><p>iv. Choose language and follow through the installation wizard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/282/1*iG-tJiunx_689BD3Kikz5Q.jpeg" /></figure><p><strong>Step 2. Installing a Virtual Machine Manager</strong></p><p>Once minikube has been installed in your computer, the next step is to install a virtual machine manager. Remember that minikube itself runs as a virtual machine hence the need for a virtual machine manager. Minikube supports different virtual machine managers such as KVM, VirtualBox, VMware as well as a few others hence you can choose a virtual machine manager of your choice. For this article, I am going to use VirtualBox as my virtual machine manager.</p><p><em>Installing VirtualBox.</em></p><p>i. Go to this <a href="https://www.virtualbox.org/wiki/Downloads"><strong>link</strong></a><strong> </strong>to download VirtualBox. Make sure to select one which is compatible with your operating system. In my case, I am going to choose for windows hosts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DiaUJ0jX2CoinABUaIN9qg.jpeg" /></figure><p>ii. Once your download is complete, double click on the downloaded executable file to start the VirtualBox installation wizard. Follow through the installation wizard until VirtualBox is installed in your local machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/482/1*nyY_-6bdjtfSgej8hSzP4g.jpeg" /></figure><p><strong>Step 3: Starting minikube.</strong></p><p>Now that you have installed minikube in your local machine as well as a virtual machine manager, it is time to run the minikube virtual machine, create and view your very first Kubernetes cluster.</p><p>i. Click on the windows start button in your computer and key in the term ‘command prompt’ in your search bar.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4TGp38DlPFnVveeVTdm5Fw.jpeg" /></figure><p>ii. Right click on command prompt and choose run as administrator.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B_drbAoghy16gkD6Oe6zdQ.jpeg" /></figure><p>iii. Type <em>minikube start — — driver = VirtualBox </em>in the command prompt to start minikube and press enter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/978/1*rQ56kZ602BJVchXw_rcMiA.jpeg" /></figure><p><strong><em>Note:</em></strong> Be patient as minikube starts. When running minikube for the first time, it may take a while as the different minikube components are installed.</p><p>iv. Minikube is now up and running.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/978/1*uKuyv9LftciDfYiX9BNyzw.jpeg" /></figure><p>v. You can check the status of your Kubernetes cluster by running the <strong><em>minikube status</em></strong><em> </em>command. As seen below, all the components are up and running.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*drcbAPb10YGxNBOTI6VfWA.jpeg" /></figure><p>vi. Start interacting with your cluster. For instance, you can check the nodes in your cluster by typing <strong><em>minikube kubectl get node</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*1z9acP1BFDNqRnRRtIE6ow.jpeg" /></figure><p>In this case, I have one node running which is the control-plane and is still the worker node. At this point, you can now build and deploy your applications locally using minikube.</p><p><strong>Summary.</strong></p><p>In this article, you were able to create your first Kubernetes cluster running in your local machine using minikube. As seen, to run Kubernetes locally in your machine using minikube, you first need to download the minikube installer. Once downloaded, run the installer to install minikube. Similarly, you will need a virtual machine manager in order to use minikube since minikube runs as a virtual machine.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=75f8feeb5ed6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kubernetes: What it is, Components and Benefits.]]></title>
            <link>https://medium.com/@Cyrus_M/kubernetes-what-it-is-components-and-benefits-1f96ae9576c8?source=rss-cc64ac293a8------2</link>
            <guid isPermaLink="false">https://medium.com/p/1f96ae9576c8</guid>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Cyrus Mutua]]></dc:creator>
            <pubDate>Mon, 16 Jan 2023 10:44:52 GMT</pubDate>
            <atom:updated>2023-01-16T10:44:52.642Z</atom:updated>
            <content:encoded><![CDATA[<h3>Kubernetes: What it is, components and benefits.</h3><p>Traditionally, software developers used the monolithic architecture to build their applications. This meant that applications were run as a single process or were broken down into smaller processes hosted or rather spread across multiple servers. Monolithic software architecture is still widespread today as it has its own advantages. In this architecture, all the components of the application are combined together to form one big application. Similarly, updating one component of a monolithic application requires the software developer to recompile as well as test the entire application.</p><p>In recent times, developers have adopted the practice of breaking down monolithic applications into smaller independent components commonly referred to as microservices. Due to their independence, microservices can be deployed, developed, updated or even scaled individually without affecting each other. However, with the increase in the number of deployable components, it becomes very difficult to run the entire application smoothly as configuration and management of the various components become an uphill task. This has led for the need of an automation system responsible for the configuration, scheduling, scaling and management of the various components of the application and this is where Kubernetes comes to the rescue. In this article, I am going to explain to you what Kubernetes is, the different features of Kubernetes, Kubernetes architecture and the benefits of Kubernetes in the simplest way possible.</p><p><strong>What is Kubernetes?</strong></p><p>Commonly known as known as K8s and developed by google, Kubernetes is an open-source container orchestration tool that is widely used in the management of containerized applications. Kubernetes comes in handy when it comes to automating the deployment, and scaling (vertical or horizontal scaling) of applications. From the definition, two questions arise; what are containerized applications and what is container orchestration?</p><p><strong>Container Orchestration and Containerized applications.</strong></p><p>Container orchestration is the automation of the management of containers throughout their lifecycle including provisioning, redundancy health monitoring, resource allocation, scaling and load balancing as well as moving between physical hosts.</p><p>Containerized applications on the other hand are applications that are usually run-in isolated environments that include only the operating system libraries and dependencies required to execute the code underneath. The runtime environment that is used to run these applications is known as a container. Containers basically bundle up the application together with its operating system dependencies including configuration files and binaries into a single executable file.</p><p>That containers run in isolation simply means that each container does not need its own copy of an operating system. Instead, a container runtime engine is installed on the host operating system making it possible for different containers to run on the same operating system.</p><p><strong>Kubernetes Architecture.</strong></p><p>Having looked at what Kubernetes is, it is time demystify how Kubernetes works and the various components that make up the Kubernetes system. Kubernetes is made up of two key components; The master node and the worker nodes each working together to achieve the desired outcome.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XIE52n_MkqEj9eOsxa362Q.jpeg" /><figcaption><em>Image credit: </em>https:<a href="https://geekflare.com/kubernetes-architecture/">//geekflare.com/kubernetes-architecture/</a></figcaption></figure><p><strong><em>The Master Node</em></strong></p><p>The master node is responsible for keeping an eye on the entire Kubernetes system and holds the Kubernetes Control Panel.</p><p>The control panel is comprised of various components that makes the Kubernetes cluster function efficiently. These components are <em>The Kubernetes API Server, The Scheduler, The Controller Manager and etcd.</em></p><p><em>Kubernetes API Server — Enables you and other control components communicate with the Kubernetes system.</em></p><p><em>Scheduler — is responsible for assigning each deployable application components to a worker node.</em></p><p><em>Controller Manager — Controls every activity that is happening in the cluster and is responsible for creating replica components, taking care of failing nodes and keeping an eye on the worker nodes.</em></p><p><em>etcd — used for data storage purposes. It provides a persistent storage of the cluster configuration.</em></p><p><strong><em>The Worker Nodes.</em></strong></p><p>Or simply the nodes, worker nodes are the machines that run your actual containerized applications. The worker nodes are comprised of <em>a runtime engine, kubelet and a Kubernetes Service Proxy (Kube Proxy).</em></p><p><em>Runtime engine — </em>A runtime engine such as Docker is used to run the containers.</p><p><em>Kubelet</em> — communicates with the API Server and is responsible for managing containers on its node.</p><p><em>The Kubernetes Service proxy or simply kube proxy</em> — used for load balancing of the network traffic between application components.</p><p><strong>Benefits of Using Kubernetes.</strong></p><p>With the development of container technology which has made it possible for developers to package their application together with their dependencies, software developers don’t have to worry anymore about the production environment in which their applications are going to be run. What this means is that developers can now focus on improving the application features and even deploy these applications on their own without the need to know about the underlying infrastructure. Kubernetes has made it possible to run as well as automate the application deployment process together with many other benefits discussed below.</p><p><strong><em>Better Hardware Utilization.</em></strong></p><p>When Kubernetes is used to run your applications, it is responsible for determining the most appropriate resources needed to run your application and is able to assign the most appropriate node to provide these resources based on your application description. This eliminates the need to manually set up the infrastructure to be used to run your application. Similarly, Kubernetes has the ability to move your application components around the cluster freely making it easier for Kubernetes to utilize infrastructure more efficiently as compared to doing it manually.</p><p><strong><em>Ability to perform health checks and self-healing capabilities.</em></strong></p><p>Given that application components in Kubernetes are not tied entirely to a single node and application components can be moved across different worker nodes freely, this makes it possible for Kubernetes to be able to monitor failing nodes and is able to automatically reschedule the application components running on those nodes to other healthy nodes. This means that the ops team does not need to migrate application components manually in the event of server failure.</p><p><strong><em>Autoscaling</em></strong></p><p>In the traditional application deployment strategy, the operations team needed to constantly keep an eye on individual loads of each application components and respond to any increase in loads. However, with Kubernetes, it is able to monitor any sudden increase in load or rather resource utilization by each application component and adjust each running application instance accordingly.</p><p><strong><em>Eased application deployment.</em></strong></p><p>Kubernetes has made it possible for developers to be able to deploy applications on their own without the need to know about the underlying infrastructure running their applications. However, when need arises, the developer is able to define what resources are needed to run what application components and Kubernetes is able to respond efficiently to the demand.</p><p><strong><em>Steps for running an application in Kubernetes.</em></strong></p><p>In order to run your first application in Kubernetes below are the steps;</p><p>i. Package your application to one or more container images using any container runtime engine of your choosing e.g., Docker.</p><p>ii. Push the image container to a container registry.</p><p>iii. Describe your application to the Kubernetes API Server.</p><p><strong>Conclusion.</strong></p><p>In this article, you have seen the events that led to the need to develop a service such as Kubernetes. Even though, monolithic application architecture is still widely used today, the impact of Kubernetes in Application development and production cannot be ignored. Kubernetes has made it possible for developers to be able to deploy their applications without the need of an operations team or the need to worry about conflicting development and production environments. The self-healing capability of Kubernetes as well made the work of system administrators and the operations teams easier in that in the event of a server failure in this case represented by a worker node, Kubernetes is able to assign an application running on those nodes to other healthy nodes without affecting the running of the application. Systems administrators need to only make sure that Kubernetes cluster is up and running without the need to worry about the underlying infrastructure.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1f96ae9576c8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[5 Challenges Facing Novice Web Developers.]]></title>
            <link>https://medium.com/@Cyrus_M/5-challenges-facing-novice-web-developers-461d3f5cf9f2?source=rss-cc64ac293a8------2</link>
            <guid isPermaLink="false">https://medium.com/p/461d3f5cf9f2</guid>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Cyrus Mutua]]></dc:creator>
            <pubDate>Tue, 21 Jun 2022 14:31:02 GMT</pubDate>
            <atom:updated>2022-06-21T14:31:02.416Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RByIgKs2PyrpTKgFO6urvA.jpeg" /></figure><p>In the era of technological advancement, many people have considered if not jumped ship towards a career in tech. With the growth in demand for software developers driven by the increasing number of tech startups among other factors, software development has grown to be a lucrative field that has excited many people. The increase in the number of people who have access to the internet around the globe has made it even better with so much information shared over the internet accessible to many people as well as increased connectivity among people around the globe which can be attributed to an increase in the consumption of social media.</p><p>However, with so much resources available on the internet for anyone willing to become a web developer, many newbie web developers lack a practical approach on how to fully make use of these resources. In this article, I am going to discuss the obstacles that novice web developers face in their web development journey and a possible solution to the obstacles.</p><ol><li><strong>Procrastination.</strong></li></ol><p>I tend to liken procrastination to a disease that somehow takes away ones energy and motivation to do what needs to be done. Procrastination is common among new web developers and even spreads across experienced web developers who despite their experience in software development have difficulties completing their projects on time. However, among novice web developers, procrastination hinders ones ability to set the ball rolling and so much time is lost making up your mind on whether or when to begin your journey towards becoming a successful web developer. Most newbie web developers tend to struggle with procrastination mostly due to the weight of the task that lies ahead and tending to believe that it is impossible to breakthrough.</p><p>The good news about procrastination is that it is completely curable. As an inexperienced web developer, all you need to do is to start somewhere and set the ball rolling. It is upon you to trigger your dopamine and create a different perception to the task. Once your begin, make sure that each day that goes by, some time is dedicated towards your journey. Let not a single day pass without learning something new. Repeat this for a number of days or weeks and you will realize some new found motivation along the way to actually keep going.</p><p><strong>2. Lack of Consistency</strong></p><p>Consistency is a key factor in the web development journey. Consistency tends to keep your mind fresh and makes it easier in grasping key web development skills. Many people who are on the journey of becoming web developers and are in the learning phase tend to lack the consistency needed. Consistency improves ones mastery of a subject. You tend to have days when you are really motivated where you put in the time and the effort to learn something new and in some days you are completely off and unmotivated to even do anything which may lead you to procrastinate.</p><p>What I can tell you as a newbie web developer is that you are not alone, this is a common practice among many novice web developers. The sad part about inconsistency is that one tends to take longer than anticipated in mastering your skills as web developer and this may breed a lack of motivation given that your progress is hugely dented. This is because, on the days that you are motivated to achieve your goals and actually do something constructive, a lot is gained, however, this means nothing without consistency as the next time that you are motivated to keep pushing again, one is forced to go back to what was learned previously before as chances are that you won’t remember anything leading to a lack of progress. Therefore, one ought to be consistent if you truly intend to become a a skilled web developer.</p><p><strong>3. Tutorial Hell</strong></p><p>As stated earlier, tons of resources are available on the internet today. One mistake that many inexperienced web developers do is spending lots of hours watching or downloading tutorials on the web without actually putting into practice what they learn. This creates a false impression that one is actually covering a lot by merely watching tutorials. Others copy and paste program/project source code to their IDEs and get really excited when they have these projects running on their computers.</p><p>While tutorials are a good resource in learning web development, how to utilize them correctly is the big deal. Tutorials are only meant to sharpen your skills and learn new stuff that maybe beneficial to your journey. My advice to every novice programmer/web developer out there is to practice writing your own code. Try as much as you can to put the skills that you learn into practice and when you are stuck along the way, don’t be afraid to consult from your tutorials. It is only through this way that one can really know how much they have gained from their tutorials.</p><p><strong>4. Lack of a Clear Path</strong></p><p>So, you are thinking of becoming a web developer or changing careers and joining the tech bandwagon but you have no idea where to begin from, or where to get the right resources or even what skills are needed or come first? Sorry, you are not alone. Before setting out on your journey towards becoming a web developer, it is advisable to perform a thorough due diligence on the right tools that are needed to become skilled in your niche.</p><p>Many novice web developers lack a clear process that need to be followed and end up getting stuck along the way due to a lack of proper guidance on the right hierarchy of skills needed for web development. This is a big problem especially to self-taught web developers who have no prior background in Computer Science or any IT related field. Therefore, my one cent on anyone who wants to be a web developer is to have a clear process or guide that they intend to follow and follow it to the end.</p><p><strong>5. Lack of a Proper Network</strong></p><p>Networking is a thing for every aspiring web developer out there. Networking enables one to interact with like minded individuals some who are experienced and were once in your position . This experienced individuals are a great resource as they are the to go to people when you are stuck and can offer the right guidance for your journey. You also get to interact with individuals who are at your level who can be a great asset for your motivation as your share your journey with them and compare notes.</p><p>As a newbie in the world of web development, networking is essential and there are various platforms that offer great networking opportunities such as social media platforms including twitter communities and so many more. Make sure to network in your early stages of learning web development as this makes the journey easier and helps you to stay motivated which most aspiring web developers lack the most.</p><p>It is my hope that this article was beneficial to everyone looking to begin their web development journey.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=461d3f5cf9f2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>