This tutorial will show you how to develop an application using Okteto Stacks. Okteto Stacks are for developers who don't want to deal with the complexities of Kubernetes manifests. Okteto Stacks implement and extend the Compose Specification to make it easy to deploy containers in Kubernetes.
- Install the Okteto CLI. Follow this guide if you haven't done it yet.
- Configure Access to your Okteto Cloud Namespace using the Okteto CLI or using the Okteto Cloud UI.
Get a local version of the Sample App by executing the following commands:
The Sample App is a simple web application implemented using Python, with Redis for storage.
docker-compose.yml file defines the components of the Sample App:
The equivalent Kubernetes manifests would have more than 300 lines of yaml!
Deploying the Sample App is as simple as executing this command:
deploy command will create the necessary deployments, services, persistent volumes, and ingress rules needed to run the Sample App. Cool no 😎?
Open your browser and go to the URL of the application. You can get the URL by logging into Okteto Cloud and clicking on the application's endpoint:
Let's make some changes to our application. For example, open the
vote/app.py file in your IDE and modify the voting options on lines 16-17. Save your changes.
Once you're happy with your changes, execute the following command:
okteto stack deploy --build automatically builds a new image tag using the Okteto Build Service, pushes it to the Okteto Registry, and redeploys your application with the new image tag.
In a matter of seconds, your changes are running in the Cloud 💥!
Congratulations, you just developed your first application in Okteto Cloud 🚀.
Head over to our getting started guides for Go, ASP.NET, Java, Node.js, PHP, Python, or Ruby to see how to configure Okteto to live-update your application with different programming languages and debuggers.