/okteto-test

This is exciting. First time dabbling into okteto. Enjoyed every bit of it.

Primary LanguageGo

How To

Kindly go through the following steps to deploy this application:

  1. You need to have hooked up your okteto CLI to your K8 to deploy this application. Run all the required go commands to get the dependencies.

  2. Run the command cp .env.example .env to create a clone of your local environment variables. In the new .env file, kindly provide the name of your K8 namespace. You can only leave this blank if you have elevated permission in the cluster.

  3. You should run okteto deploy --build to create the deployment, or if you modify the K8s.yml or the okteto file.

  4. Once your deployment has been set up, you can connect to the Okteto development platform using the command okteto up, and once you're connected, you should start the application using the command go run main.go. You can also use the command make start if you like the easy life.

  5. You can run the test routes in the pods.http file to test the respective routes. Don't forget to change the baseURL to yours if different.

  6. As an added advantage, you can manage the K8 cluster by hooking to it locally. Connect your kubectl using the okteto context use <your okteto kubernetes url>, and view your deployment using the kubectl get deploy -n <your namespace>. You can also manually scale the deployment using the kubectl scale --replicas=<your desired number> deployment/tech-assessment command.

  7. To run the tests, simply run the following command go test ./... and you're good to go. Please feel free to make changes and send in your PR. I look forward to the collab.