Below you will find pages that utilize the taxonomy term “Kubernetes”
The kubectl wait Command
Last week, while writing end-to-end tests for our Kubernetes application, we discovered a useful Kubernetes command. Namely, the kubectl wait
command. We managed to stabilize our test using this command, and we will explain how we did it in this post.
We have written our end-to-end tests in bash, and they deploy and manage different Kubernetes resources. Bash scripts execute commands sequentially, waiting for the first to finish before executing the next one. Consider the following script, where we first deploy an Nginx instance and then read its logs.
Better Terminal Experience for Git and Kubernetes
When working on a project that uses git, it is essential to checkout the correct branch. You don’t want to realize after a few hours of work that you worked on the wrong branch and have a few messy merges and rebases in front of you. Of course, the easiest way to show the current branch is to run git status
but that requires an action from you, Instead, I recommend you to include the git branch as part of your prompt string. The prompt string is the string that marks your command line and is set by the shell variable PS1
.