반응형

Pod에 붙어 있는 PV 확인

 

$ kubectl describe pod "파드 이름" -n "namespace"

# Mounts 부분을 확인하면 어떤 디렉토리가 pv인지 확인 할 수 있다.
반응형

'Kubernetes' 카테고리의 다른 글

[Kubernetes]Node, Pod, Container 리소스 사용량 확인  (0) 2024.11.03
kubernetes yaml 분석  (1) 2024.10.07
kubectl 자동 완성  (0) 2024.09.06
kubernetes cluster 재설정  (1) 2024.06.30
Ubuntu 20.04 Kubernetes cluster 구축 방법  (1) 2024.06.30
반응형

kubectl 자동 완성

*현재 조건

  • Mac m1
  • kubectl 설치 완료
  • oh-my-zsh 사용
$ source <(kubectl completion zsh)  # 현재 셸에 zsh의 자동 완성 설정
$ echo "[[ $commands[kubectl] ]] && source <(kubectl completion zsh)" >> ~/.zshrc # 자동 완성을 zsh 셸에 영구적으로 추가한다.
$ echo "[[ $commands[kubectx] ]] && source <(kubectx $ZSH/custom/completions zsh)" >> ~/.zshrc

echo "fpath=($ZSH/custom/completions $fpath)" >> ~/.zshrc
$ cd ~/.oh-my-zsh/custom/plugins/

# zsh-autosuggestions 플러그인 
$ git clone https://github.com/zsh-users/zsh-autosuggestions

# zsh-syntax-highlighting 플러그인
$ git clone https://github.com/zsh-users/zsh-3syntax-highlighting.git

# plugin 활성화 plugins 항목에 다음것들을 추가해주면 된다.
$ vi ~/.zshrc
plugins=(git zsh-syntax-highlighting zsh-autosuggestions kubectl kube-ps1)
반응형
반응형

- Worker Node

sudo kubeadm reset
sudo rm -rf /etc/cni/net.d
sudo iptables -F
sudo iptables -X
sudo iptables -t nat -F
sudo iptables -t nat -X
sudo iptables -t raw -F
sudo iptables -t raw -X
sudo iptables -t mangle -F
sudo iptables -t mangle -X
sudo ipvsadm --clear
rm $HOME/.kube/config


# 만약 cache가 있으면 cache도 제거

 

 

- Master Node

sudo kubeadm reset

sudo rm -rf /etc/cni/net.d
sudo rm -rf /var/lib/etcd
sudo rm -rf ~/.kube

sudo kubeadm init --pod-network-cidr=192.168.0.0/16

mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config

curl https://raw.githubusercontent.com/projectcalico/calico/v3.24.5/manifests/calico.yaml -o calico.yaml
kubectl apply -f calico.yaml
반응형

'Kubernetes' 카테고리의 다른 글

[Kubernetes]Node, Pod, Container 리소스 사용량 확인  (0) 2024.11.03
kubernetes yaml 분석  (1) 2024.10.07
Pod에 붙어 있는 PV 확인  (0) 2024.09.11
kubectl 자동 완성  (0) 2024.09.06
Ubuntu 20.04 Kubernetes cluster 구축 방법  (1) 2024.06.30

+ Recent posts