Okteto Cloud gives you free access to sandboxed Kubernetes namespaces, fully integrated with remote development capabilities. Develop your Kubernetes applications in Okteto Cloud and forget about slow and tedious local development forever.
This tutorial will show you how to create an account in Okteto Cloud and how to develop a Ruby sample application.
Get a local version of the Ruby sample application by executing the following commands in your local terminal:
git clone https://github.com/okteto/samples
Deploy the Ruby Sample App by using the following command:
kubectl apply -f manifests
deployment.apps "blog" created
You can also use Okteto Cloud to develop your applications directly in Kubernetes, avoiding dependencies on local installations and developing in a much more production-like environment. We are going to use the dev version of the Ruby Sample Application we just deployed as our remote development environment. To do that, run the following command:
✓ Development environment activated
okteto up command starts a remote development environment which means:
All of this (and more) can be customized via the
okteto.ymlmanifest file. You can also use the file
.stignoreto skip files from file synchronization. This is useful to avoid synchronizing build artifacts or git metadata.
To run the application, execute in the remote shell:
=> Booting Puma
Once the server is running, browse to the the URL of the application.
okteto up started forwarding port 8080 to your local machine, so you can access it at https://localhost:8080.
You should now see an error message similar to this one in your browser:
Migrations are pending. To resolve this issue, run: bin/rails db:migrate RAILS_ENV=development
This is because we have a pending migration. Press
ctrl + c and run the following commands from the Okteto terminal:
Browse again to your application, it should load without any issues. At this point, you have a web application that can create, show, list, update and destroy articles.
Notice how your changes are instantly applied. No commit, build or push required 😎!
Congratulations, you just developed your first Kubernetes application in Okteto Cloud 🚀.
Okteto lets you develop your application while taking advantage of other services running in Kubernetes. This way you can:
- Reduce local setup and eliminate integration issues by developing the same way your application runs in production
- Test your application as fast as you type code, without typing either
kubectlin your inner loop cycle
- No more CPU cycles wasted in your machine. Hardware and network just limited by the power of the cloud
Okteto uses the
okteto.yml file to determine the name of your development environment, the docker image to use and where to upload your code. Check the Okteto manifest docs to customize your development environments with your own dev tools, images, and dependencies to adapt Okteto to your own application.