This blog will describe how to automate the kubectl setup for Cloud Dev Environments such as Gitpod.
Why is it necessary to automate?
Gitpod offers an ephemeral environment. If you want to use kubectl on each/all workspaces, it must be configured. As a result, you won't have to manually install and configure kubectl every time you start working on it.
What is Ephemeral Environment?
An ephemeral environment is a short-lived, encapsulated deployment of an application. Ephemeral environments provide robust, on-demand platforms for running tests, previewing features, and collaborating asynchronously across teams. (Ref. here)
TL;DR; these are "Dynamic environments", "Temporary environments", "on-demand environments" or "short-lived environments".
Pre-Baked Dev Environment
Gitpod gives users the ability to construct pre-baked (ready to use) environments by offering .gitpod.yml that automate the configuration of the development environment. In order to avoid having to set up everything from scratch, users save time and experience less friction in their lives.
Automate kubectl setup
You only need two files to complete this task: your .gitpod.yml file and a script that executes the setup and installation of kubectl along with all other necessary tools.
First, You need to copy-paste this script in any directory of that particular project.
Now, You need to execute this script from your .gitpod.yml (present in the root of your project).
Note: You Can set scope at for all worskapces (⚠️) or at your Org. Level, at your Personal username level, or at Just Repo. Level. Read More: Configure Environment Variables
Maybe you use vault or some other secret storage, that's okay. The key is to inject them into the config when the workspace starts.
🚀 Now, You are ready to use AWS CLI, & With that, you can log in to your SSO or Use AWS ECR to use Private…
Learn how to bring your own dotfiles to Gitpod | Bring your own Dotfiles to Gitpod | dotfiles on Gitpod
Bring your Dotfiles to Gitpod
Ever wondered how you can bring your personal dotfiles configurations to Gitpod to have your personalized ephemeral developer environments in the cloud? Here's how...
How Does this Repo. Works?
It has a ./setup.sh file that contains the initial setup script to execute all the scripts to install/ configure required services under ./scripts/ to keep that X service installed on your next Gitpod Workspaces. For example, it contains following scripts
./scripts/gpg_configure.sh is script to configure GPG key.
./scripts/terraform_configure.sh is script to setup & configure Terraform.