I struggle with always wanting to do the best that I can and when it doesn’t go that way it makes me feel like I’m not worthy enough. I have started to change my outlook on the way I view life. There…
Now that we have our development environment defined, we need to configure our local environment to work with Okteto Cloud.
First, run the okteto login
command to create your Okteto Cloud account and link it to your local computer (you only need to do this once per computer).
Second, run the okteto namespace
command to download the Kubernetes credentials for Okteto Cloud, and to set it as our current context.
Now we are ready to go! Run the okteto up
command to launch our development environment directly into Okteto Cloud:
The okteto up
command launches a development environment in Okteto Cloud, keeps your code synchronized between your development environment and your local machine and automatically opens a shell into the development environment for you. From now on we'll be running all the commands directly in our remote development environment (note the okteto>
bash symbol in the code samples 😎).
Download the v3.0.0-beta.1 release from github, and install it in /usr/bin/local
.
Run helm version
to make sure everything is OK (We are dealing with beta software, after all).
The biggest change introduced by Helm 3 (in my opinion) is that Tiller is gone. This makes Helm a lot simpler to use, since the Helm commands now run under the credentials you’re using instead of those of an intermediate service. This has huge implications, specially if you’re working on a shared or multi-tenant cluster. This is particularly exciting for us, since it allow us to fully support Helm as a 1st class citizen in Okteto Cloud.
What I did got a chance to try out was the full lifecycle of a local chart. As you can expect, it’s pretty much the same as Helm v2, but without the Tiller-related complexities.
To keep exploring Helm 3, we are going to create a simple chart by running helm create
. This command creates a chart with a deployment of an NGINX container and its corresponding service.
Deploy your chart by running the helm install
command:
You can then run helm list
to see all the installed releases:
Another big change that’s being introduced with Helm 3 is that now every release has it’s own secret, clearly tagged with the name of the release and the version, and stored in the same namespace (no more searching across namespaces to find why a certain value was applied!). This makes rolling back versions easier, since Helm only needs to apply the contents of the secret, instead of having Tiller do complicated calculations.
You can see the content by running the kubectl get secret
command:
I couldn’t figure out how to decode/decrypt the content of the secret, I’ll update blog post once I do.
Let’s go ahead and cick on the URL to see our application up and running.
Let’s change the boring “Welcome to nginx page!” with something with more flair. We’ll upgrade our chart and change the container image from nginx
to ramiro/hello
using the helm upgrade
command.
Run helm list
to see the state of the release. Notice how the value of revision
changed from 1
to 2
to indicate that a new version was deployed.
If you run the kubectl get secret
command you’ll also see that a new secret was created for our new release, along with the older one (for rollback purposes).
Go back to your browser, reload the page, and verify that it was correctly upgraded 🐶.
Now let’s simulate that we have a bad build. We’ll rollback to the previous stable version by using the helm rollback
command.
If we go back to our browser and reload the page, we should see NGINX’s welcome page once again. You can rollback to any specific revision, as long as the secret is still available.
Use the helm uninstall
command to uninstall the chart and remove all the related resources.
Once you’re done playing with your development environment, exit the terminal and run the okteto down
command to shut it down. But don't worry, all the files you created there (like the chart) were automatically synchronized back to your local machine.
Ephemeral development environments are a great way to keep different tech stacks from messing with each other, or to quickly try out beta software without “polluting” our machine. Making them super easy to use for everyone is one of our main motivations with building Okteto.
and eyes glued and fingertips and good lighting and likes and follows and heart eye emojis and water drop emojis and safety and desire and finished products and 50 dollar leggings and pumping heart…
What makes getting a startup off the ground challenging is the fact that no one knows if the offering has value until it has generated revenue. Every startup faces the challenge of acquiring its…
Seis tesis acerca del artículo de Núria Alabao: “¿Se puede equiparar la maternidad subrogada con el trabajo sexual?”. 1. Que los vientres de alquiler sean equiparables o no al trabajo sexual es lo de…