Skip to content

Commit

Permalink
add minikube-echoserver docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jhole89 committed Mar 22, 2020
1 parent af4031f commit 40d546d
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions minikube-echoserver/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# minikube-echoserver
Example of running [echoserver](https://console.cloud.google.com/gcr/images/google-containers/GLOBAL/echoserver) on
minikube using pure terraform

Prerequisites
* [Terraform > 0.12](https://www.terraform.io/downloads.html)
* [minikube > 1.5.2](https://kubernetes.io/docs/tasks/tools/install-minikube/)

Steps:
1. Start minikube: `minikube start`
2. Clone repo: `git clone [email protected]:jhole89/terraform-k8s-example.git`
3. Change to this directory: `cd minikube-echoserver`
4. Initialise terraform: `terraform init`
5. Apply terraform plan: `tf apply --auto-approve` - you should see the following output
```
kubernetes_namespace.example_namespace: Creating...
kubernetes_namespace.example_namespace: Creation complete after 0s [id=example-app-namespace]
kubernetes_deployment.example_deployment: Creating...
kubernetes_deployment.example_deployment: Creation complete after 5s [id=example-app-namespace/example-app-deployment]
kubernetes_service.example_service: Creating...
kubernetes_service.example_service: Creation complete after 1s [id=example-app-namespace/example-app-service]
Apply complete! Resources: 3 added, 0 changed, 0 destroyed.
Outputs:
node_port = 31740
```
6. The plan outputs the `node_port` exposed through the kubernetes service (here it was 31740). You can now hit the
endpoint using curl: `curl $(minikube ip):31740`
7. Once no longer required you can remove all resources: `terraform destroy --auto-approve`
8. Stop minikube: `minikube stop`

0 comments on commit 40d546d

Please sign in to comment.