To avoid the specification of the username and password at every git push, use commands below
1234
sudogitconfigcredential.helperstore
# this command is used when you have many repos and you want to input username/password one time
sudogitconfig--globalcredential.helperstore
Update the apt package index and install packages needed to use the Kubernetes apt repository:
123
sudoapt-getupdate
# apt-transport-https may be a dummy package; if so, you can skip that package
sudoapt-getinstall-yapt-transport-httpsca-certificatescurl
Download the public signing key for the Kubernetes package repositories. The same signing key is used for all repositories so you can disregard the version in the URL:
Add the appropriate Kubernetes apt repository. If you want to use Kubernetes version different than v1.28, replace v1.28 with the desired minor version in the command below:
12
# This overwrites any existing configuration in /etc/apt/sources.list.d/kubernetes.listecho'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.28/deb/ /'|sudotee/etc/apt/sources.list.d/kubernetes.list
To install Kubernetes Dashboard please run the commands below.
1234
# Add kubernetes-dashboard repository
helmrepoaddkubernetes-dashboardhttps://kubernetes.github.io/dashboard/
# Deploy a Helm Release named "kubernetes-dashboard" using the kubernetes-dashboard chart
helmupgrade--installkubernetes-dashboardkubernetes-dashboard/kubernetes-dashboard--create-namespace--namespacekubernetes-dashboard
KeePass2 is a tool for storing credentials with a master password, credentials will be stored in a file which is encrypted and we can't decrypt this file to get credentials without master password, so it is also safe for us to transfer this file over the internet.
To install the KeePass2, please run following commands below.
Tmux is a terminal multiplexer; it allows you to create several "pseudo terminals" from a single terminal. This is very useful for running multiple programs with a single connection, such as when you're remotely connecting to a machine using Secure Shell (SSH).
Tmux also decouples your programs from the main terminal, protecting them from accidentally disconnecting. You can detach tmux from the current terminal, and all your programs will continue to run safely in the background. Later, you can reattach tmux to the same or a different terminal.
To Install Tmux just run the command below.
1
sudoaptinstalltmux
Then to start Tmux just use command tmux
Tmux provides several keybindings to execute commands quickly in a tmux session. Here are some of the most useful ones.
First, create a new tmux session if you're not already in one. You can name your session by passing the parameter -s {name} to the tmux new command when creating a new session:
1 2 3 4 5 6 7 8 910111213
$tmuxnew-sSession1
Ctrl+BD—Detachfromthecurrentsession.
Ctrl+B%—Splitthewindowintotwopaneshorizontally.
Ctrl+B" — Split the window into two panes vertically.Ctrl+B Arrow Key (Left, Right, Up, Down) — Move between panes.Ctrl+B X — Close pane.Ctrl+B C — Create a new window.Ctrl+B N or P — Move to the next or previous window.Ctrl+B 0 (1,2...) — Move to a specific window by number.Ctrl+B : — Enter the command line to type commands. Tab completion is available.Ctrl+B ? — View all keybindings. Press Q to exit.Ctrl+B W — Open a panel to navigate across windows in multiple sessions.For additional keybindings, consult the tmux man pages.
asdf is a tool version manager. All tool version definitions are contained within one file (.tool-versions) which you can check in to your project's Git repository to share with your team, ensuring everyone is using the exact same versions of tools.
The old way of working required multiple CLI version managers, each with their distinct API, configurations files and implementation (e.g. $PATH manipulation, shims, environment variables, etc...). asdf provides a single interface and configuration file to simplify development workflows, and can be extended to all tools and runtimes via a simple plugin interface.
There is a case that we will work on multiple projects and every project will need different versions of tools or programming languages such as: Java, nodejs, maven. So if we just install specific version at global then when we switching between projects, we have to switch to the suitable versions.
To avoid this issue, we can use .tool-versions file in every project and we will define the specific version for each one.
For example we have 2 projects:
Project A:
Java: adoptopenjdk-17.0.8+7
Nodejs: 18.18.0
Maven: 3.9.3
Project B:
Java: adoptopenjdk-8.0.382+5
Nodejs: 20.5.0
Maven: 3.6.3
So we will define the .tool-versions at the root of the project A with the content as below.
Then let's run the command asdf install to install versions that we defined in the file .tool-versions in every project if we have not install them before with asdf.
Now, when we switch between projects for working, then specific versions of tools or programming languages will be changed automatically.
For example if we check the selected versions in project A by asdf then we will see the result as below.