DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Cover image for Okteto-cloud - more than a free kubernetes sandbox
Ashok Nagaraj
Ashok Nagaraj

Posted on

Okteto-cloud - more than a free kubernetes sandbox

Okteto cloud is a free, online kubernetes namespace as a service (with quotas applied). It helps users to:

  • get a forever free kubernetes namespace
  • get the first-hand UX that okteto offers (being fully compatible with okteto cli)
  • try out Preview environments
  • deploy from your github repos
  • deploy from your online/published helm charts
  • inject environment variables through okteto secrets

The Developer plan (default) is a boon for day to day ad hoc kubernetes based workflows (when there are no security concerns or corporate restrictions). Quota restrictions do apply, but quotas are generous

The login is through one's github credentials. For this post I have a github repo.

  1. Login to okteto cloud with your github credentials and authorize okteto to see your github repo [Settings] > [Integrations] > [GitHub] > [Configure GitHub]

Image description

Image description

  1. Install and configure okteto cli
❯ okteto context use https://cloud.okteto.com
Authentication will continue in your default browser
You can also open a browser and navigate to the following address:
https://cloud.okteto.com/auth/authorization-code?redirect=http%3A%2F%2F127.0.0.1%3A54114%2Fauthorization-code%2Fcallback%3Fstate%3DrLEyJ6RAGEWfybHWg7T4XRqZRJeHxKJLyalxjf0nbPY%3D&state=rLEyJ6RAGEWfybHWg7T4XRqZRJeHxKJLyalxjf0nbPY%3D
 βœ“  Context 'cloud.okteto.com' created
 βœ“  Using context ashok-an @ cloud.okteto.com

Enter fullscreen mode Exit fullscreen mode
  1. Create a simple manifest file
❯ cat okteto.yaml
build:
  api:
    context: .
deploy:
  - kubectl run test-pod --image=${OKTETO_BUILD_API_IMAGE} --restart=Never
dev:
  api:
    command: ["bash"]
    forward:
      - 8080:8080
    sync:
      - .:/src
Enter fullscreen mode Exit fullscreen mode

Note: If you have a docker-compose.yaml you can directly use okteto {deploy | up} and it should work

  1. Deploy your app
❯ okteto deploy
 i  Using ashok-an @ cloud.okteto.com as context
 i  Images were already built. To rebuild your images run 'okteto build' or 'okteto deploy --build'
 i  Running kubectl run test-pod --image=${OKTETO_BUILD_API_IMAGE} --restart=Never
pod/test-pod created

Enter fullscreen mode Exit fullscreen mode
  1. Verify Download kubeconfig: [Settings] > [Kubernetes Credentials]
❯ export KUBECONFIG=$HOME/Downloads/okteto-kube.config:${KUBECONFIG:-$HOME/.kube/config}

❯ k get pods
NAME       READY   STATUS    RESTARTS   AGE
test-pod   1/1     Running   0          5m43s
Enter fullscreen mode Exit fullscreen mode

Image description


Of-course there are more things that can be tried, the UI is very intuitive with prompts and notes; go-ahead and explore!

Top comments (0)

18 Useful Github Repositories Every Developer Should Bookmark

>> Check out this classic DEV post <<