diff --git a/site/content/en/docs/tutorials/setup_minikube_in_github_actions.md b/site/content/en/docs/tutorials/setup_minikube_in_github_actions.md index 16e0913a89..a71668b2d6 100644 --- a/site/content/en/docs/tutorials/setup_minikube_in_github_actions.md +++ b/site/content/en/docs/tutorials/setup_minikube_in_github_actions.md @@ -24,55 +24,54 @@ for more information checkout github actions marketplace :[setup-minikube](https Requirements: - a valid Dockerfile -- a valid deployment.yaml (make sure image pull policy is set to never see bellow for example +- a valid deployment.yaml to deploy image to kubernetes (make sure image pull policy is set to never see [bellow](/#deployment.yaml used in the example) for example) Steps: -- Copy the wokryaml to `.github/workflows/pr.yml` in your github repo. -- Make a PR to your repo and see the result in github actions. +- Create a workflow yaml in your github repo in `.github/workflows/pr.yml` -```yaml -name: CI -on: - - pull_request -jobs: - job1: - runs-on: ubuntu-latest - name: build example and deploy to minikbue - steps: - - uses: actions/checkout@v2 - - name: Start minikube - uses: medyagh/setup-minikube@master - - name: Try the cluster ! - run: kubectl get pods -A - - name: Build image - run: | - export SHELL=/bin/bash - eval $(minikube -p minikube docker-env) - docker build -f ./Dockerfile -t local/example . - echo -n "verifying images:" - docker images - - name: Deploy to minikube - run: - kubectl apply -f deploy-to-minikube.yaml - - name: Test service URLs - run: | - minikube service list - minikube service example --url - echo "------------------opening the service------------------" - curl $(minikube service example --url)/version -``` + ```yaml + name: CI + on: + - pull_request + jobs: + job1: + runs-on: ubuntu-latest + name: build example and deploy to minikbue + steps: + - uses: actions/checkout@v2 + - name: Start minikube + uses: medyagh/setup-minikube@master + - name: Try the cluster ! + run: kubectl get pods -A + - name: Build image + run: | + export SHELL=/bin/bash + eval $(minikube -p minikube docker-env) + docker build -f ./Dockerfile -t local/example . + echo -n "verifying images:" + docker images + - name: Deploy to minikube + run: + kubectl apply -f deploy-to-minikube.yaml + - name: Test service URLs + run: | + minikube service list + minikube service example --url + echo "------------------opening the service------------------" + curl $(minikube service example --url)/version + ``` In this example, the above workflow yaml, will do the following steps on each coming PR: -1- Checks out the the source code -2- Installs and starts minikube -3- Trying out the cluster just by running kubectl get pods -A -4- Build the docker image using minikube's docker-env feature -5- Apply the yaml deployment yaml file minikube -6- Check the service been created in minikube +1. Checks out the the source code +2. Installs & starts minikube +3. Tries out the cluster just by running `kubectl` command +4. Build the docker image using minikube's docker-env feature +5. Apply the yaml deployment yaml file minikube +6. Check the service been created in minikube -### example deployment yaml for minikube +### deployment.yaml used in the example ```yaml apiVersion: apps/v1