<?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 kumar rishabh on Medium]]></title>
        <description><![CDATA[Stories by kumar rishabh on Medium]]></description>
        <link>https://medium.com/@kkumarrishabh?source=rss-1ff0c8d6e3b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*9yQqaqIFjh7-XYLbGvuVlg.jpeg</url>
            <title>Stories by kumar rishabh on Medium</title>
            <link>https://medium.com/@kkumarrishabh?source=rss-1ff0c8d6e3b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 20:10:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kkumarrishabh/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[Agile v. Waterfall]]></title>
            <link>https://kkumarrishabh.medium.com/agile-v-waterfall-3580fcd80036?source=rss-1ff0c8d6e3b------2</link>
            <guid isPermaLink="false">https://medium.com/p/3580fcd80036</guid>
            <category><![CDATA[agile-methodology]]></category>
            <category><![CDATA[waterfall]]></category>
            <category><![CDATA[scrum-agile]]></category>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[agile-development]]></category>
            <dc:creator><![CDATA[kumar rishabh]]></dc:creator>
            <pubDate>Fri, 06 May 2022 09:34:06 GMT</pubDate>
            <atom:updated>2022-05-06T09:34:06.824Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*JdPQLKUSmL-Z76DtIo0pZQ.jpeg" /></figure><h3>What exactly has changed?</h3><p>Software as an engineering has started way back in 1950’s. However, we were well versed in engineering the roads, rails, and other manufacturing practices. Now as a practice If any new engineering is born, I will start using the processes and management technique I am aware of and this gave birth to Waterfall model.</p><p>Analogous to a simple manufacturing practices, we list down the jot down the requirement, then finalize the design, Do build the product, and then Verify it before calling this a release. This provides us the classical waterfall model, which on years of usage turned out to be unfit for software development.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/547/1*ZGejKySQuQLUtUkg8Z38tg.png" /><figcaption>Waterfall as we know(credit — Wikipedia)</figcaption></figure><p><strong>Reason for failures: -</strong></p><p>Lets start with few Question:-</p><p>1. Can you freeze requirements in Software Industry?</p><p>2. Are you sure that we can freeze the design?</p><p>3. Are we sure that the day we have our product ready, the need for the product won’t go obsolete?</p><p>There are many other papers describing multiple disadvantages of using this model. The main is software industry is not getting ROI with this model. And yes theoretically, software development is a complex process and waterfall was designed for Simple ones. Wait, what is a complex process?</p><p>Ralph D. Stacy came out with an excellent matrix called Stacey matrix</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/1*769eU4DUBHU7F3dFPZFebQ.png" /><figcaption>Stacey Matrix(Credit managedagile.com)</figcaption></figure><p>Stacey defined the Simple, complicated, complex and chaotic processes, where in he compared Certainty and Agreement as a parameter to define. The above figure is modified to make relevance to Software. Then We had Cynefin framework to help us analyze what to do for which stage process.</p><p>And then it took us a lot of study to understand that Waterfall is for simple and for complex we need to be agile.</p><p>Agile came out in picture where the changing market demands and technology forced teams to be ready for a change and act accordingly to mitigate the risk and thus increasing the Return of Investment(ROI). Scrum is most widely used framework to achieve agile.</p><p>Agility requires</p><p>1. The ability to rapidly and deliberately respond to changing demand, while controlling risk.</p><p>2. Flexibility, the capacity and capability of rapidly and efficiently adapting.</p><p>3. The ability to innovate.</p><p>Software engineering is a game of rugby, where every minute the game changes, the strategy changes, the pressure changes, the competition changes and the environment changes. We are sometimes forced to innovate to survive and that is what agility is. We must always analyze the situation, make a plan and timely act as per the situation. We may lose a game, but inspecting of what went wrong and learning from failures will win us the next game.</p><p>In the end, the change in mindset while delivering things is what the difference between these two terms is. Whatever process management strategy we choose, What we get in the end is Software product. Just we need to remember and reiterate to ourselves as individual that the change is coming and coming earlier then you can anticipate. Change may come next month, next week or may be next morning. How you react to it will make difference.</p><p>References:</p><p>Stacey RD. <em>Strategic management and organisational dynamics: the challenge of complexity</em>. 3rd ed. Harlow: Prentice Hall, 2002.</p><p>“A Leader’s Framework for Decision Making” — <em>Harvard Business Review</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3580fcd80036" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[IT, Agile and 90 days notice period]]></title>
            <link>https://kkumarrishabh.medium.com/it-agile-and-90-days-notice-period-34307d4f6b53?source=rss-1ff0c8d6e3b------2</link>
            <guid isPermaLink="false">https://medium.com/p/34307d4f6b53</guid>
            <category><![CDATA[it-industry]]></category>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[employee-welfare]]></category>
            <category><![CDATA[notice-period]]></category>
            <category><![CDATA[india]]></category>
            <dc:creator><![CDATA[kumar rishabh]]></dc:creator>
            <pubDate>Mon, 04 Oct 2021 13:02:07 GMT</pubDate>
            <atom:updated>2021-10-04T13:02:07.355Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>A Chief Minister in one of the state in India was replaced by another in couple of days and it gave rise to a meme on the hidden truth in Indian IT industry.</blockquote><blockquote>When CM can resign and get relieved in just 2 days, we are still talking about 60–90 days of notice period in Job.</blockquote><blockquote>Open question: Are we more responsible than CM</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/275/1*hPBHUdLAxRSPqY55Yfj1NQ.jpeg" /></figure><p>Indian IT companies claims to be able and contains a good amount of managers, leads and teams working in 100 percent agile models and are excellent in handling changes. Companies have subject matter experts who are driving a large industry into the world of agility. These companies provide the support to small or medium size enterprises to move better in agile world.</p><p>But what made these highly agile team not anticipate a plan on the agility when a person exits? Are we really agile when we say that we will take 90 days to adapt this change? And there is one thing which adds fuel to fire is the same companies advocates early joiners, like really?</p><p>The answer is, the IT (or the Indian IT) industry is utilizing this notice period as an employee retention program. Since the companies with long notice period prefers early joiners this makes an employee with long notice period unable to get new offers easily.</p><p>Now the stated reasons for such a long notice period may be as follows:-</p><ol><li><strong>It takes time to fill your position :- </strong>Agreed! But what is the success rate of getting a replacement of a resource within the notice period? 50 percent? No. If it could even be 50 percent, we could call that a success.</li><li><strong>Employee have a dependency :-</strong> Though I do not agree with it completely. Managers/Leads are responsible to make IT teams working with zero dependencies. And if there is any, no dependency takes 90 days to get resolved.</li></ol><blockquote><strong><em>Did you know :</em></strong><em> Talent recruitment team hates this 90 days notice period because, most talent in India take offer from one org and use that offer with another org and jump to third</em></blockquote><p>Above listed reasons were the ones I have heard of, if there is any other too, I do not think that will be logical. IT industries are capable of doing things but not doing this as for these 90 days, they will be billed for the resource. I have seen many instances of a non-billable resources getting waived off from the notice period. For the unknown, IT companies provide man power to foreign clients(mostly US) and charge the client an amount say for example $50 per hour and a resource is allotted to the client for the job. Now there is always a risk associated that if the person leaves early we will have to compromise on this $50 per hour.</p><p>One of the latest examples of capabilities of IT industry was showcased during Covid situation was that they went to remote working. In early 2000’s we wanted to bring this work-from-home culture, but IT always said that there are challenges in the model and were reluctant to adopt it. But the day they realize losing their $50 per hour, they switched instantly to the same model and are doing good.</p><p>There had been petitions to get the notice period reduced. <a href="https://www.change.org/p/it-minister-shri-ravishankar-prasad-90-days-of-notice-period-in-it-and-ites-is-harming-industry-and-needs-to-be-30-days">https://www.change.org/p/it-minister-shri-ravishankar-prasad-90-days-of-notice-period-in-it-and-ites-is-harming-industry-and-needs-to-be-30-days</a></p><p>But nothing is being done in this respect and probably will never be.</p><h3>Food For Thought?</h3><ol><li>Are we really agile when we have 90 days notice period?</li><li>Employee don’t have right to have a smooth Exit?</li><li>Shouldn’t notice period be same throughout industry?</li><li>Do we need an IT all Employee Unions, which may work in welfare of IT Employees?</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=34307d4f6b53" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[BDD in Test Automation]]></title>
            <link>https://kkumarrishabh.medium.com/bdd-in-test-automation-46619ddd52d5?source=rss-1ff0c8d6e3b------2</link>
            <guid isPermaLink="false">https://medium.com/p/46619ddd52d5</guid>
            <category><![CDATA[gherkin]]></category>
            <category><![CDATA[test-automation]]></category>
            <category><![CDATA[bdd-testing]]></category>
            <category><![CDATA[test-automation-framework]]></category>
            <dc:creator><![CDATA[kumar rishabh]]></dc:creator>
            <pubDate>Tue, 19 Jan 2021 17:27:19 GMT</pubDate>
            <atom:updated>2021-01-19T17:27:19.943Z</atom:updated>
            <content:encoded><![CDATA[<p>This is an introduction to Behavioral Driven Development. I used C# with Specflow to achieve BDD in selenium. So I will add my understanding here on the Concepts of BDD.</p><h3>Why Use BDD?</h3><p>Now, the common scenario is that a Business Analysts are not always a technical person and has a problem in understanding the automation test structure, where tests are just the method specifications or method calls.</p><p>Similarly keeping the TDD approach, we again have the same problem that the tests are a methods call.</p><p>In both the approaches, all BA’s must have is and experience with the programming language syntax else there is no way of understanding it.</p><p>Thanks to Dan North!! He solved the problem for us by introducing Jbehave and Rbehave for Java and Ruby respectively. Here he introduced the simple text language syntax(known as Gherkin), making things understandable. So Gherkins hides the test implementation code behind a plain text(Now supports multiple languages) and let anyone understand what this test does.</p><p>Following is the Gherkin syntax :-</p><pre>Feature: Guess the word<br><br>  # The first example has two steps<br>  Scenario: Maker starts a game<br>    When the Maker starts a game<br>    Then the Maker waits for a Breaker to join<br><br>  # The second example has three steps<br>  Scenario: Breaker joins a game<br>    Given the Maker has started a game with the word &quot;silky&quot;<br>    When the Breaker joins the Maker&#39;s game<br>    Then the Breaker must guess a word with 5 characters</pre><p>So if your audience is a non technical people, yo may choose to develop your automation framework in BDD.</p><h3>Exploring Gherkins</h3><p>So let us use following gherkin for our understanding of what is what :-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/1*8cqzz-YrjKrQZmaceQUdTQ.png" /><figcaption>Gherkin Syntax (Feature file)</figcaption></figure><p>So Gherkins has a small set of keywords or concepts which are following :</p><p>1. Feature<br>2. Background<br>3. Scenario<br>4. Given<br>5. When<br>6. Then<br>7. And<br>8. But<br>9. Examples<br>10. Scenario Outline</p><p>All these can be defined in the file with a “.feature” extension file which are referred here as feature files.</p><p><strong>Features </strong>is a unique name of collection of scenarios, through which one can easily understand what test this feature file will contain. so the syntax goes as :-</p><p>Feature: Name of the feature<br><em>Description of feature</em></p><p>Feature comes up with the line below them to describe the feature briefly.</p><p><strong>Background</strong> is a place to define a common code where you want these list of steps to be executed before every Scenario in the same feature. this is analogous to Setup() or BeforeTest() methods widely used in selenium or TestNG.</p><p>In the Gherkin Syntax shared above, user will have to navigate to any website, for all the scenario under the feature file, so instead of writing it again and again, we prefer to write that precondition once for all.</p><p><strong>Scenario</strong> is where we write the actual steps of operations to be performed. Scenario comes up with a unique test case title which is written after “Scenario: This is the test title”. No two same scenarios can be present anywhere in the feature files. These scenarios has steps which starts with Given, When, And, Then and But.</p><p><strong>Given</strong> some initial context,<br><strong>When</strong> an event occurs,<br><strong>Then</strong> ensure some outcomes.</p><p>This means, ‘Starting with the initial context, when a particular event happens, we know what the outcomes should be.’</p><p>Thus, the example shows the expected behavior of the system. The examples are used to illustrate different scenarios of the system.</p><p><strong>And/But</strong> If you have successive Given’s, When’s, or Then’s, you <em>could</em> write:</p><pre>Example: Multiple Givens<br>  Given one thing<br>  Given another thing<br>  Given yet another thing<br>  When I open my eyes<br>  Then I should see something<br>  Then I shouldn&#39;t see something else</pre><p>Or, you could make the example more fluidly structured by replacing the successive Given’s, When’s, or Then’s with And’s and But’s:</p><pre>Example: Multiple Givens<br>  Given one thing<br>  And another thing<br>  And yet another thing<br>  When I open my eyes<br>  Then I should see something<br>  But I shouldn&#39;t see something else</pre><p>So “And” and “But” helps us increase the readability of the feature file and are actually Given , When and Then. If they are used after a When , they will be a when in the definitions.</p><p><strong>Scenario Outline</strong> is useful in a place where we want to execute same steps with different set of data. For example, I want to test login functionality for two different user. So the BDD will be:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/737/1*O41QG8jqvZd4TOAjaQs0qQ.png" /><figcaption>Scenario Outline example</figcaption></figure><p>This will execute twice once for each row in the examples table taking values in each row one by one. So if we have 10 users, we can go ahead for test them all just by adding required information into the examples table.</p><h3>What Next?</h3><p>Install any Gherkin Parser, like Specflow, Cucumbur, Jbehave, Rbehave etc. and explore the working of Gherkins to enhance BDD approach.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=46619ddd52d5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What’s new in Scrum Guide 2020]]></title>
            <link>https://kkumarrishabh.medium.com/whats-new-in-scrum-guide-2020-fba5a6513f34?source=rss-1ff0c8d6e3b------2</link>
            <guid isPermaLink="false">https://medium.com/p/fba5a6513f34</guid>
            <category><![CDATA[professional-scrum-master]]></category>
            <category><![CDATA[scrum-agile]]></category>
            <category><![CDATA[scrum]]></category>
            <category><![CDATA[2020-scrum-guide]]></category>
            <dc:creator><![CDATA[kumar rishabh]]></dc:creator>
            <pubDate>Mon, 23 Nov 2020 21:05:26 GMT</pubDate>
            <atom:updated>2020-11-23T21:25:11.298Z</atom:updated>
            <content:encoded><![CDATA[<p>And what has changed for us!!</p><p>Ken Schwaber &amp; Jeff Sutherland came up with a new version of scrum guide. So number of pages have been reduced, keeping the thought that more words makes things complicated, but what else have changed. Lets have a look by starting with the Preamble(As per me) of change</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*KNiREJPoBDGoyNvsuWIBsA.jpeg" /></figure><blockquote>“The Scrum framework is purposefully incomplete, only defining the parts required to implement Scrum theory. Scrum is built upon by the collective intelligence of the people using it.”</blockquote><p>Well the statement is self explanatory and is a nice add. It majorly explain the view of creators while making the changes. Lets see what these are.</p><h3>Introduction of Product Goal</h3><blockquote>“The Product Goal describes a future state of the product which can serve as a target for the Scrum Team to plan against.”</blockquote><p>To include a long term goal for product.</p><p>This is the one step to “deliver value”. Now what we work in a sprint is clear but why we are doing it will be answered by this. So the necessity was that the teams are sprinting keeping just the short term goal in mind but not considering the long term goal, which would be our product goal. This increases the transparency within the organization.</p><p>2017 guide says a word “vision” which is being removed now. Vision is vague, and the product goal added some feel of commitment which, after few inspect and adapts, will ultimately will define the vision.</p><h3>Daily Scrum</h3><p>Finally there is a good bye to 3 questions format in daily scrum.</p><ul><li>What did I do yesterday that helped the Development Team meet the Sprint Goal?</li><li>What will I do today to help the Development Team meet the Sprint Goal?</li><li>Do I see any impediment that prevents me or the Development Team from meeting the Sprint Goal?</li></ul><p>But the matter of fact is that even previous scrum guide did not even mentioned those questions as mandatory. But it brings to one’s mind that it is the scrum recommended method and nothing else is to be followed.</p><p>So now do not restrict yourself to this format. Innovate!!</p><h3>Improvement in Backlog Refinement</h3><p>I searched for the word “Estimate” in new scrum found and the search results showed, that is is not found. Also earlier, It used to define 10 percent of effort in backlog refinement, which is not there. Does that mean we should not do it? No, they just want us to do refinement our own way. The way which added value to the process.</p><p>In the refinement, the word “Estimate” is replaced with “Sizing”. So that makes sense when you do things empirically.</p><h3>Clarifying that the increment can be delivered any time in the sprint</h3><blockquote>“The moment a Product Backlog item meets the Definition of Done, an Increment is born.”</blockquote><p>And</p><blockquote>“Multiple Increments may be created within a Sprint. The sum of the Increments is presented at the Sprint Review thus supporting empiricism.”</blockquote><p>Even the earlier guide meant the same but the statement is redefined to make the process clear. So now(or even earlier one can) you can release an increment on the Day1, get feedback and rework empirically.</p><h3>There is only one team called Scrum team</h3><p>There is no such term called “Development team”. We just have one team, scrum team consisting of Product Owner, Scrum Master and developers.</p><p>Though it do not changes any roles for any person but just put the whole responsibility to team as a whole. Also it added another leverage to split large teams into small. In the guide, Developer teams has changed to developers.</p><blockquote>“If Scrum Teams become too large, they should consider reorganizing into multiple cohesive Scrum Teams, each focused on the same product.”</blockquote><p>Couple of teams still follows that structure.</p><h3>Addition of “Why” in Sprint planning</h3><p>What and How, is now replaced with Why, What and How. So I believe we use to do this “Why” thing. May be after attaining certain level of maturity in the sprint process, teams started to think of this “Why”. Now this is added as a reminder to the teams starting the scrum framework to start considering this “why” to add value to the product and the increment.</p><h3>Clearer Accountability of Scrum Master</h3><blockquote>“The Scrum Master is accountable for the Scrum Team’s effectiveness.”</blockquote><p>So now Scrum master is no longer a “Servant-leader”. This means that scrum master should go over from a secretarial job of arranging meetings, sending invites. this is to shift the role from a “servant” to a “leader” and take accountability of the value delivered by a scrum team.</p><h3>Artifacts comes with a commitment</h3><blockquote>For the Product Backlog it is the Product Goal.</blockquote><blockquote>For the Sprint Backlog it is the Sprint Goal.</blockquote><blockquote>For the Increment it is the Definition of Done.</blockquote><p>We have covered Product goal separately and sprint goal was always been there. Definition of done is tied to the increment just to make people push towards a better increments which is acceptable by stake holder.</p><h3>Self Managing(Not Self Organizing)</h3><p>The word organizing changed to managing.</p><p>When we say self organizing, teams own the ‘how’ to do the work, along with deciding ‘who’ does the work within the team. Whereas, in a self-managed structure, employees own the ‘how’ and who, along with the ‘what’ to work on.</p><p>So when we add “what’s” and “why’s” we are no more organizing, but managing.</p><h3>“Lean” thinking</h3><blockquote>“Scrum is founded on empiricism and lean thinking.”</blockquote><p>With lean thinking, organizations have to seek to eliminate processes that aren’t valuable and keeping the lean principals in mind.</p><h3>My views on change</h3><p>So this guide did some changes to get out of scrum anti-patterns and provided more free hand to the team to Inspect and adapt while remaining transparent.</p><p>Though being a believer in the scrum process, I cannot consider it the best but yes a better increment of it. Though the roles have been the same, as nothing has changed but all we need to change in scrum is a mindset, which I believe is what represented in a change. Lets show some agility and inspect it thoroughly to again adapt accordingly.</p><p>The major aim of organizations implementing scrum framework remains “quality product with value to customer” and this is what this change is trying to achieve in the process.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fba5a6513f34" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deployment in Kubernetes for Selenium Grid]]></title>
            <link>https://kkumarrishabh.medium.com/deployment-in-kubernetes-for-selenium-grid-eb9db265160d?source=rss-1ff0c8d6e3b------2</link>
            <guid isPermaLink="false">https://medium.com/p/eb9db265160d</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[test-automation]]></category>
            <category><![CDATA[selenium-grid]]></category>
            <category><![CDATA[selenium]]></category>
            <category><![CDATA[cloud]]></category>
            <dc:creator><![CDATA[kumar rishabh]]></dc:creator>
            <pubDate>Sun, 06 Sep 2020 11:11:36 GMT</pubDate>
            <atom:updated>2020-09-06T11:11:36.031Z</atom:updated>
            <content:encoded><![CDATA[<p>Now, since we have gain enough knowledge on Kubernetes working, It is a right time to deploy the setup to run selenium grid.</p><h3>Pre-Requisite</h3><ol><li>VS Code with yml and kubernetes add-on.</li><li>A selenium code with remote driver using Selenium Grid.</li><li>Understanding of <a href="https://medium.com/@kkumarrishabh/kubernetes-in-testing-6fb8dab00f48">Kubernetes Basics</a>.</li><li>A <a href="https://medium.com/@kkumarrishabh/running-pods-replication-controllers-on-kubernetes-and-understanding-services-734ec005dc8f">Kubernetes setup</a> and good to have some hands on as described in the linked article.</li></ol><h3>Kubernetes deployments</h3><p>A <em>Deployment</em> provides declarative updates for Pods ReplicaSets.</p><p>You describe a <em>desired state</em> in a Deployment, and the Deployment Controller changes the actual state to the desired state at a controlled rate. You can define Deployments to create new ReplicaSets, or to remove existing Deployments and adopt all their resources with new Deployments.</p><p>So to reduce our maintenance time on upgrading each pods/scripts whenever a new selenium hb or node version comes up, we opt for Deployments and Replication sets.</p><p>So lets open a VS code and go ahead with a Deployment template by creating a new yml file and adding “Kubernetes deployments”</p><p>Following is the Deployment we need to run for hub:-</p><pre>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: selenium-hub<br>spec:<br>  selector:<br>    matchLabels:<br>      app: selenium-hub<br>  template:<br>    metadata:<br>      labels:<br>        app: selenium-hub<br>    spec:<br>      containers:<br>      - name: selenium-hub<br>        image: selenium/hub:3.141.59-20200326<br>        resources:<br>          limits:<br>            memory: &quot;128Mi&quot;<br>            cpu: &quot;500m&quot;<br>        ports:<br>          - containerPort: 4444<br>        livenessProbe:<br>          httpGet:<br>            path: /wd/hub/status<br>            port: 4444<br>          initialDelaySeconds: 30<br>          timeoutSeconds: 5</pre><p>Now to create a deployment we need to run command “kubectl create -f &lt;Path and yml filename&gt;”</p><p>Now our selenium hun is up, but is not exposed yet and there is no nodes to run the test cases. Let us run the nodes by Replication controller which soes as :-</p><pre>apiVersion: v1<br>kind: ReplicationController<br>metadata:<br>  name: selenium-rep<br>spec:<br>  replicas: 2<br>  selector:<br>    app: selenium-rep<br>  template:<br>    metadata:<br>      name: selenium-chrome<br>      labels:<br>        app: selenium-rep<br>    spec:<br>      containers:<br>        - name: selenium-node<br>          image: selenium/node-chrome<br>          ports:<br>            - containerPort: 5555<br>          env:<br>            - name: HUB_HOST<br>              value: &quot;selenium-srv&quot;<br>            - name: HUB_PORT<br>              value: &quot;4444&quot;</pre><p>Presently it runs 2 replicas, you may increase it when needed. Now we need a service to control these, service yml goes like :-</p><pre>apiVersion: v1<br>kind: Service<br>metadata:<br>  name: selenium-srv<br>  labels:<br>    app: selenium-srv<br>spec:<br>  selector:<br>    app: selenium-hub<br>  ports:<br>  - port: 4444<br>    nodePort: 40001<br>  type: NodePort</pre><p>Now this service exposes the port 40001 for usage. When we say nodePort, it actually talks on Kubernetes node(Please do not confuse it with selenium node here).</p><p>Now we need node IP which will act as a hub’s IP and port is 40001 as described in service above.</p><p>Lets execute a command, “kubectl describe node” and search for internal IP. This IP should be entered in you Selenium code and the code is executed.</p><p>Ta da.. Test passes on Pods..!!</p><p>Now how can we see run time logs?? Lets see Visual code and the Kubernetes extension.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/52/1*dQnUQ_Tgju3rTqAeJ0oWBw.png" /><figcaption>Kubernetes Extension</figcaption></figure><p>So the logs will be visible in the nodes description as :-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/315/1*oOD91Yri6nnsux4dr40kBw.png" /><figcaption>Logs in Kubernetes Extensions</figcaption></figure><p>So We have executed our tests on Kubernetes..!! Now you can take this deployment to cloud using Kubernetes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xD-U06SW84QJXv-tbXq3zQ.png" /><figcaption>Kubernetes, Selenium Grid On cloud</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eb9db265160d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Running Pods, Replication Controllers on Kubernetes and Understanding Services]]></title>
            <link>https://kkumarrishabh.medium.com/running-pods-replication-controllers-on-kubernetes-and-understanding-services-734ec005dc8f?source=rss-1ff0c8d6e3b------2</link>
            <guid isPermaLink="false">https://medium.com/p/734ec005dc8f</guid>
            <category><![CDATA[kubernetes-controller]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[kubernetes-pods]]></category>
            <category><![CDATA[minikube]]></category>
            <category><![CDATA[kubectl]]></category>
            <dc:creator><![CDATA[kumar rishabh]]></dc:creator>
            <pubDate>Fri, 31 Jul 2020 15:00:06 GMT</pubDate>
            <atom:updated>2020-10-23T13:43:34.819Z</atom:updated>
            <content:encoded><![CDATA[<p>Hands on with simple Kubernetes commands by installing minikube on your local system</p><p>So now, as we are aware of Kubernetes basics, it is the time to move ahead and implement the learning. In case you cannot recall the basics, get a quick go through at “<a href="https://medium.com/@kkumarrishabh/kubernetes-in-testing-6fb8dab00f48">Kubernetes in Testing</a>”</p><h3>Pre-Requisites</h3><ol><li>VS Code</li></ol><h3><strong>Installing Kubernetes(Windows OS)</strong></h3><p>The first Pre-requisite is to have the Hyper-v enabled on you s system, Hyper-v is preinstalled in the windows 10 Enterprise, Pro, or Education versions. See Microsoft assistance on the same <a href="https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v">here</a>.</p><p>Once it is up, we would be setting up another software called MiniKubes. Minikube is a tool that runs a single-node Kubernetes cluster in a virtual machine on your personal computer.</p><p>To install the software quickly, it is recommended to use chocolaty software. chocolaty provides software management automation. If you are from a linux background, chocolaty is analogous to “yum” in RHEL and “apt-get” in ubuntu world. Install chocolaty <a href="https://chocolatey.org/docs/installation">here</a>.</p><p>Now to install minikube with chocolaty(Run As Administrator). just issue following commands :-</p><blockquote>choco install minikube</blockquote><p>Also, we sill be using the kubernetes cli (kubectl) to interact with kubernetes. following chocolaty command will help.</p><blockquote>choco install kubernetes-cli</blockquote><p>To test that the installations are ok, just type “minikube” on your command line and check for the help manual. Similarly, It should work up for “kubectl”.</p><p>Thats It!! We are done with the installation part. Lets see things in action now.</p><h4>Starting Minkube and basic kubernetes commands</h4><p>Now to start a single-node cluster, just start with :-</p><blockquote>minikube start</blockquote><p>After few minutes of wait, the following message should be seen(This message differs for different minikube versions, just be sure that there is no Errors. )</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*Gk_7TZwEdkBzmRWaQGvvvQ.png" /><figcaption>Successful Minikube start</figcaption></figure><p>More commands to try are :-</p><p>minikube status</p><p>minikube dashboard</p><p>See what they do, we will learn about them later.</p><h3>Working With Pods</h3><p>Pods, can be started through yml files, and creating a pod, service, deployment etc using kubectl.</p><h4>Configuring VS Code for Kubernetes yml</h4><p>For this you need some Extensions to be installed in your VS Code. Do Ctrl+Shift+X to add extension and then add following extensions:-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g5msJsERUTHqtJtWIm3cPg.png" /><figcaption>Extensions Needed</figcaption></figure><p>Now, If you are done with this, Create a yml file (Add new file and save it with .yml extension). Once done, type Pod and click enter on the suggestion:-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y7OujCrZ9wYE5lOckJHrjw.png" /><figcaption>Kubernetes — suggestions</figcaption></figure><p>And see the yml template is ready.</p><p>Let us understand this by containerizing a linux machine. So first step we need to do is look for a docker container image.</p><p>If you see the Pod YML template, there are few things we need to add, They are :-</p><p>name — lets make it myfirstpod</p><p>containerPort : This is the port you want to expose. Lets make it 8090 for now.</p><p>image — This is really important that what you want your pod to be. Lets start with a small linux image. For the image lets visit <a href="https://hub.docker.com/">docker</a> website to fetch images. On the home page Search Linux and then select any image and read description for the tags likeubuntu:latest debian:latest or alpine:3.7.or you can google as say alpine docker image and you will find many different images.</p><p>Let us keep it ubuntu:latest</p><p>Save the file, go to Command prompt and run kubectl create -f &lt;path with the YML file name&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/574/1*FAPzZ1CvrP8Aeru4IgtQKA.png" /></figure><p>Easy.. Isnt’it??</p><p>Now how can i see the Pod.. Lets try kubectl get pods</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/609/1*8cbTZqpn9pKnq4Jz5T4_Hw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/569/1*AnYaagw6Jcm_XspWCQEDLg.png" /></figure><p>And The completed status makes your Pod setup complete. However it crashed during the run with “CrashLoopBackOff” status(The restart count kept on increasing). We may have to troubleshoot the issue. Probably this is the space issue. I tried using other images, finally got success with “nginx” image after removing the limits. And finally Pod was “Running”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/529/1*t5Yuk9uE2rxZU733NHl6Lw.png" /></figure><p>Following is the YML file used :-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*H4gzmtFn1zNWrYqLAgw3bg.png" /></figure><p>Further, we may try some more commands such as “ kubectl describe pod myfirtspod” — This provides you the details of the pod including the IP and the open port. But wait can you ping this IP? Try it. You won’t be able to do that as these pods are not exposed to you directly. Now lets try to create controllers, services and deployments for selenium grid and try to use these pods. And you can delete pod as “ kubectl delete pod myfirtspod”</p><h4><strong>Replication Controller</strong></h4><p>Now Lets first start with creating a Replication Controller and see its advantage. We will use the “nginx” image. So we will create a new yml file and type Replication Controller to get template. so every thing remains same, only Replicas : 3 is added where 3 is number of parallel images yo uwant to run. This will help us create nodes later.</p><p>I used following yml :-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/948/1*xBCEQPUuGaR3v63Ol6lW_A.png" /></figure><p>to get :-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/649/1*nltnqaTKyh7RR_pkDbef7A.png" /></figure><p>Now, why use Replication Controller, if we can create multiple pods? Let us see this and try to delete a pod created by Replication Controller and then see the pods. i.e.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/735/1*Ei5LglCOKU70ZiQBD6F4KQ.png" /></figure><p>The replication controller assure that the 3 replicas are up and running everytime. If some pod fails or crash, a new fresh replica replaces it.</p><p>New commands to try “kubectl get ReplicationController” “kubectl describe ReplicationController myfirstrc” and “kubectl delete ReplicationController myfirstrc”</p><p>Also now if we want to change the number of replicas on run time, then we change the yml file and start “kubectl apply -f &lt;path and name of the yml&gt;”. this will update the setting.</p><h4>Services</h4><p>In Kubernetes, a Service is an abstraction which defines a logical set of Pods and a policy by which to access them (sometimes this pattern is called a micro-service).</p><p>Suppose Pod A communicates with Pod B or Pod C, which are running using Replication controller RC as :-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/371/1*zzTQjL4fzUAL5NmMg0i6pA.png" /></figure><p>Here, suppose if POD C crashes, then Replication controller will takeover and create a Pod D whose IP will be changed, and hence, we cannot rely on IP for communication sake, then we need a Service which keeps the record of the pods and acts as a mediator to get the work done. In this case Pod A will communicate to the Service only i.e.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/1*47_IhUPD4yY9vDJxdExK1A.png" /></figure><p>Services will keep track of Pods, if they change, Service will keep track of the pods. Pod A will be connecting to the service without let the Pod A to bother about the other pods in use. Pods are indentified with the Labels(called as label selector).</p><p>Kubernetes provides following type of services :-</p><ul><li><strong>ClusterIP:</strong> Exposes the Service on a cluster-internal IP. Choosing this value makes the Service only reachable from within the cluster. This is the default ServiceType.</li><li><strong>NodePort</strong>: Exposes the Service on each Node’s IP at a static port (the NodePort). A ClusterIP Service, to which the NodePort Service routes, is automatically created. You’ll be able to contact the NodePort Service, from outside the cluster, by requesting &lt;NodeIP&gt;:&lt;NodePort&gt;.</li><li><strong>LoadBalancer:</strong> Exposes the Service externally using a cloud provider’s load balancer. NodePort and ClusterIP Services, to which the external load balancer routes, are automatically created.</li><li><strong>ExternalName:</strong> Maps the Service to the contents of the externalName field (e.g. foo.bar.example.com), by returning a CNAME record</li></ul><p>We will be using the Node Port Service in our Selenium Grid setup.</p><p>So Since now we are aware of some basic kubectl commands, we must have a look on the <a href="https://kubernetes.io/docs/reference/kubectl/cheatsheet/">Kubectl cheat sheet</a>.</p><p>Up Next, We will be understanding Kubernetes Deployments and will create a Kubernetes Deployment to start hub and then will connect our nodes to hub via services and run our tests on Kubernetes using selenium official images.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=734ec005dc8f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kubernetes in Testing]]></title>
            <link>https://kkumarrishabh.medium.com/kubernetes-in-testing-6fb8dab00f48?source=rss-1ff0c8d6e3b------2</link>
            <guid isPermaLink="false">https://medium.com/p/6fb8dab00f48</guid>
            <category><![CDATA[selenium-grid]]></category>
            <category><![CDATA[kubernetes-cluster]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[kubernetes-architecture]]></category>
            <dc:creator><![CDATA[kumar rishabh]]></dc:creator>
            <pubDate>Sat, 11 Jul 2020 15:22:15 GMT</pubDate>
            <atom:updated>2020-07-31T15:02:31.371Z</atom:updated>
            <content:encoded><![CDATA[<h4><strong>Helping a new user to understand Kubernetes with intent to deploy Selenium Grid using Kubernetes</strong></h4><h4><strong>Objective</strong></h4><p>The aim of this story is <strong>to get familiar with basic kubernetes terms</strong> so that one can work, troubleshoot with kubernetes with the aim of deployment a Selenium Grid setup on Kubernetes.</p><h4>What is Kubernetes?</h4><p>Kubernetes (K8s) is an open-source system for automating deployment, scaling, and management of containerized applications.</p><p>Back in 2014, Google open sourced the project it was using to manage its deployments. It came up to be the largest project for container management. With its 15+ years of experience, google have implemented the industries best practices and the several ideas on the problems faced by them in day to day practices.</p><h4>Kubernetes Architecture</h4><p>A high level architectural view is represented below :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wwRkaayA80sRgsEuypE8EA.png" /><figcaption>Kubernetes Architecture</figcaption></figure><p>Kubernetes Contains following components :-</p><p><strong>Kubernetes master</strong>, consisting of a Scheduler, API Server, Controllers and etcd.</p><p><strong>Kubernetes Nodes</strong>, consisting of a Kubelet, Kube-Proxy and Pods.</p><p>Let us now quickly understand the roles and responsibility of each one of them.</p><h4><strong>Understanding Kubernetes Master</strong></h4><p>Master acts as a Manager of the nodes. It controls all the nodes and is responsible to send the commands to the nodes about what it needs to do. It acts as a place for user to interact with kubernetes.</p><p>We can interact with Kubernetes using <strong><em>Kubernetes API server</em></strong> through command line tools “kubectl”. We need to hit an exposed REST API through the JSON requests on Kube API server to get our task done.</p><p>Master keep the information all the available nodes on the component called <strong><em>etcd</em>. </strong>If you are from the Linux background, etcd is not something new you have heard. This is similar to what we have in linux. “etcd”<strong> </strong>is a strongly consistent, distributed key-value store that provides a reliable way to store data that needs to be accessed by a distributed system. If you are not from linux background, consider it similar to you system windows registry with all the details of the nodes.</p><p>In Kubernetes, <strong><em>controllers</em></strong> are control loops that watch the state of your cluster(current state), then make or request changes where needed(desired state). for example, a thermostat in a room:-</p><p>When you set the temperature, that’s telling the thermostat about your <em>desired state</em>. The actual room temperature is the <em>current state</em>. The thermostat acts to bring the current state closer to the desired state, by turning equipment on or off.</p><p>These controllers include:</p><ul><li>Node controller: Responsible for noticing and responding when nodes go down.</li><li>Replication controller: Responsible for maintaining the correct number of pods for every replication controller object in the system.</li><li>Endpoints controller: Populates the Endpoints object (that is, joins Services &amp; Pods).</li><li>Service Account &amp; Token controllers: Create default accounts and API access tokens for new namespaces</li></ul><p>Let us not worry of the controllers yet, it was more of a theoretical thing, for now we should just keep in mind that when we need to change the state to our desired state, we would require a controller.</p><p>A <strong><em>scheduler</em></strong> watches for newly created Pods that have no Node assigned. For every Pod that the scheduler discovers, the scheduler becomes responsible for finding the best Node for that Pod to run on. The scheduler reaches this placement decision taking into account the scheduling principles described below.</p><h4>Understanding Kubernetes Nodes</h4><p>Nodes are the place where the actual job will be performed. All what we have specified in Master will actually be executed on the Node. Master will command the nodes to do the tasks we will specify in the manifest file(YML or JSON)</p><p>The kubelet is the primary “node agent” that runs on each node. Kubelet ensures that the containers described by master are running and healthy. It just report the health status for the healthy or a damaged pods, it will not take action to repair the damage.</p><p><strong><em>Kube-Prox</em>y </strong>acts as a network manager for Pods. It helps in connection forwarding and other network rules on the pods.</p><p><strong><em>Pods</em></strong> are the smallest deployable units of computing that can be created and managed in Kubernetes. A Pod encapsulates an application’s container (or, in some cases, multiple containers), storage resources, a unique network identity (IP address), as well as options that govern how the container(s) should run. A Pod represents a unit of deployment: <em>a single instance of an application in Kubernetes</em>, which might consist of either a single <a href="https://kubernetes.io/docs/concepts/overview/what-is-kubernetes/#why-containers">container</a> or a small number of containers that are tightly coupled and that share resources.</p><p>We would require a <strong><em>container runtime</em> </strong>to run a pod. the most common container runtime used with kubernetes is Docker.</p><p>Pods are atomic, if it dies, it will not wait for a crashing pod to recover. The another pod will be created instantly, as defined in controllers.</p><p>So Once we have a basic structure in mind, we can move forward to the concept in action.</p><p>After knowing the above concepts, we can move to deploy Kubernetes on the local servers or on the cloud, so let us brush up these concepts and move for the deployments.(Article Coming soon for local Selenium grid deployments)</p><h4><strong>Want to read more?</strong></h4><p><a href="https://kubernetes.io/docs/home/">Kubernetes Documentation</a></p><h4>Want Hands On?</h4><p><a href="https://medium.com/@kkumarrishabh/running-pods-replication-controllers-on-kubernetes-and-understanding-services-734ec005dc8f">https://medium.com/@kkumarrishabh/running-pods-replication-controllers-on-kubernetes-and-understanding-services-734ec005dc8f</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6fb8dab00f48" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>