Skip to content

Instantly share code, notes, and snippets.

@Vishal1297
Created July 27, 2022 00:47
Show Gist options
  • Save Vishal1297/764799e8f0b8f0411f4e82f5bc3efa35 to your computer and use it in GitHub Desktop.
Save Vishal1297/764799e8f0b8f0411f4e82f5bc3efa35 to your computer and use it in GitHub Desktop.
Create kube configs in user home directory.
#!/bin/bash
## Run after kubeadm init
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo cp -i /etc/kubernetes/admin.conf $HOME/admin.conf
sudo chown $(id -u):$(id -g) $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/admin.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment