TerraTest: Test a Kubernetes deployment and service

In this story, we will see how to test a Kubernetes deployment and service. For that, we will use TerraTest.

Create the deployment and service manifests

Now, we will create the deployment and the service that we want to test. In first, let’s create a deployment manifest deploy.yaml:

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deploy
spec:
selector:
matchLabels:
app: nginx
replicas: 1
template:
metadata:
labels…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store