github.com/terraform-modules-krish/terratest@v0.29.0/examples/kubernetes-hello-world-example/README.md (about)

     1  # Kubernetes "Hello, World" Example
     2  
     3  This folder contains the most minimal Kubernetes resource config—which deploys a simple webapp that responds with
     4  "Hello, World!"—to demonstrate how you can use Terratest to write automated tests for Kubernetes.
     5  
     6  Check out [test/kubernetes_hello_world_example_test.go](https://github.com/terraform-modules-krish/terratest/blob/v0.29.0/test/kubernetes_hello_world_example_test.go) to see how you can 
     7  write automated tests for this simple resource config.
     8  
     9  
    10  
    11  
    12  ## Deploying the Kubernetes resource
    13  
    14  1. Setup a Kubernetes cluster. We recommend using a local version:
    15      - [Kubernetes on Docker For Mac](https://docs.docker.com/docker-for-mac/kubernetes/)
    16      - [Kubernetes on Docker For Windows](https://docs.docker.com/docker-for-windows/kubernetes/)
    17      - [minikube](https://github.com/kubernetes/minikube)
    18  1. Install and setup [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) to talk to the deployed
    19     Kubernetes cluster.
    20  1. Run `kubectl apply -f hello-world-deployment.yml`
    21  
    22  
    23  
    24  
    25  ## Running automated tests against this Kubernetes deployment
    26  
    27  1. Setup a Kubernetes cluster. We recommend using a local version:
    28      - [Kubernetes on Docker For Mac](https://docs.docker.com/docker-for-mac/kubernetes/)
    29      - [Kubernetes on Docker For Windows](https://docs.docker.com/docker-for-windows/kubernetes/)
    30      - [minikube](https://github.com/kubernetes/minikube)
    31  1. Install and setup [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) to talk to the deployed
    32     Kubernetes cluster.
    33  1. Install [Golang](https://golang.org/) and make sure this code is checked out into your `GOPATH`.
    34  1. `cd test`
    35  1. `go test -v -tags kubernetes -run TestKubernetesHelloWorldExample`