With the advent of agile and DevOps, organizations are moving from specialized roles to cross-functional teams—and that means cross-functional sharing of the specialized tools used in each silo.
So it's not unreasonable for a tester to need access to the tools used in those other silos—including Kubernetes, the open-source platform for managing containers.
Here's how to use Kubernetes to quickly gauge application quality and speed up the delivery of value.
Kubernetes in a nutshell
Kubernetes is a production-grade container orchestration tool with automated deployment, scaling, and management capabilities. At a high level you can specify an entire, complex application in YAML.
You no longer need to implement Kubernetes on sets of many virtual machines. Instead, you can choose from several installation options that allow the whole framework to run on a single virtual machine for testing development and testing purposes.
This means individual contributors can take the production specification of the application and run it locally, putting a full-blown instance of the application in their hands.
What Kubernetes does for testing
Kubernetes brings five critical things to testers:
- Decreased dependence on shared environments
- Direct access to logs
- The ability to get to a complicated failure state quickly
- Cheap disposable environments
- Unambiguous communication with developers
Each of these advantages brings value by either allowing work to happen in parallel, shortening the feedback cycle, or enhancing communication within and among groups.
Several possibilities arise once you have a personal environment that is guaranteed to closely match that of production. First, you don't need to coordinate with anyone. You can run risky tests that could potentially destroy the environment at will because no one else depends on your copy. And you can easily re-create your environment in the event of disaster.
Also, there's no need to worry about consuming a particular type of data for a test case. It is all yours.
Additionally, Kubernetes provides facilities, in the form of jobs and operators, that you can use to control an application's state. If you have a long test case that's failing, you can use Kubernetes to get to the failure state quickly. And the development team can co-opt whatever combination of jobs and operators you use to reproduce an error in order to create a bug fix.
Kubernetes provides an unambiguous way for you to communicate bug reports, saving the time spent trying to reproduce an issue.
Typically, a complicated bug requires a developer to stand in the tester's cube, because one missed step may cause the defect not to be observable.
Kubernetes also gives you access to the logs. If you are using your own instance of Kubernetes, you'll have instant access to the entire stack on which each component of the application you are testing executes. Gone are the days when you needed to note the time of failure, submit a ticket to operations for the logs, and hope something useful came back that you could put in the bug report.
Also, because the environment is not shared, you can be assured that any error in the log is actually related to your issue.
[ Paul Bakker: One year using Kubernetes in production: Lessons learned ]
Instant feedback
Kubernetes helps to "shift left" in testing. As a testing tool, Kubernetes allows developers and testers to work together to solve deficiencies faster and more accurately. When a tester logs a bug, the developer can come over or access the tester's Kubernetes instance and see the deficiency.
Using containers, developers can work with testers to design, build, and deploy a fix just for the tester's environment almost instantly. You can then give unambiguous, immediate feedback on the quality of the fix.
This eliminates the delay associated with code reaching a shared environment in long, regular intervals, and the days or weeks that might pass before the developer gets any feedback on whether what she did worked. Kubernetes helps testers and developers pass back and forth precise information on application behavior quickly.
How to avoid Kubernetes complexities
Kubernetes is an extremely complicated tool. Fortunately, as a tester you don't need to know everything. You just need to identify what operational tasks would help deliver value if testers in your organizations could do them.
As a testing specialist, you should not be creating the YAML code that defines the application or deciding on a container technology. But learning just some aspects of Kubernetes will help you become more effective as a tester.
Specifically, as a cross-functional team member who specializes in testing, you probably only need to know the following:
How to start Kubernetes in a virtual machine
How to find the logs of each component in the GUI or the command line
How to access the GUI
How to tell which version of which components of the software are running
How to update just one component of your application
How to read the important parts of the YAML specification
Where to start
Almost anyone of any skill level can get started checking out Kubernetes with some of the simpler pre-packaged distributions. The quickest way to start is to install a virtualization hypervisor such as VMware, Virtual Box, or Hyper-V.
I recommend getting started with Ubuntu and Microk8s, an option on the Ubuntu install menu. After the initial install, all you need to do is learn a few simple Microk8s commands, and you'll be well on your way to leveraging Kubernetes.
Additionally, you can look into Minikube, Kubeadmin-dind, and Kubernetes using Linux LXD containers on Ubuntu.
[ Related story: 5 must-do security steps for Kubernetes ]
Get going!
Kubernetes is a hugely expansive, multifaceted tool that's not just for DevOps. It can help you as a tester to greatly increase your productivity. Kubernetes' biggest advantage is that you can use it to deliver a production environment on your own desktop.
By untangling data and safety dependencies from shared environments, you can move faster. Having direct access to logs, and a guarantee that you are the only person on the system, makes defect reporting more accurate and faster.
Testers and developers can work together on a private instance to test hot fixes. Developers can see exactly what is wrong and can provide immediate fixes for testing to the person that reported the issue, which makes the feedback loop very short.
Kubernetes is more than just a container orchestration tool—it's one heck of a testing tool.
For more on using Kubernetes in testing, see my presentation, "Leveraging Kubernetes as a Tester," at the STAREAST software testing conference, April 28–May 3 in Orlando, Florida. TechBeacon readers can save $200 on registration fees by using promo code SECM.
Keep learning
Take a deep dive into the state of quality with TechBeacon's Guide. Plus: Download the free World Quality Report 2022-23.
Put performance engineering into practice with these top 10 performance engineering techniques that work.
Find to tools you need with TechBeacon's Buyer's Guide for Selecting Software Test Automation Tools.
Discover best practices for reducing software defects with TechBeacon's Guide.
- Take your testing career to the next level. TechBeacon's Careers Topic Center provides expert advice to prepare you for your next move.