Last active
May 22, 2023 13:59
-
-
Save malikperang/82db3f21ac0fde6ab1752ce329f782e5 to your computer and use it in GitHub Desktop.
Example Multiple Kube Config files merging
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .bash_profile | |
# Get the aliases and functions | |
if [ -f ~/.bashrc ]; then | |
. ~/.bashrc | |
fi | |
# User specific environment and startup programs | |
alias k="kubectl" | |
alias microk="microk8s kubectl" | |
alias getktoken="microk8s kubectl create token default" | |
#On Prem K8s | |
export CONFIG_MICROK8S=$HOME/.kube/config | |
#Cloud K8s | |
export CONFIG_DO=$HOME/.kube/do-k8s-01-kubeconfig | |
export CONFIG_AWS=$HOME/.kube/aws-cluster-01 | |
#Merge all the configs | |
export KUBECONFIG=$CONFIG_MICROK8S:$CONFIG_DO:$CONFIG_AWS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment