IT
-
No resources found in default namespace. kubectl get podsIT 2020. 7. 2. 16:27
pod를 생성하지 않아서 생긴 문제 [root@localhost system]# kubectl get pods No resources found in default namespace. [root@localhost system]# vi pod-nginx.yaml apiVersion: v1 kind: Pod metadata: name: nginx labels: env: test spec: containers: - name: nginx image: nginx imagePullPolicy: IfNotPresent nodeSelector: disktype: ssd [root@localhost ~]# kubectl apply -f i.yaml pod/nginx created [root@localhost ~]# ku..
-
kubectl describe pods coredns-66bff467f8-9hq7j -n kube-systemIT 2020. 7. 1. 16:45
[root@master ~]# kubectl get pods --all-namespaces NAMESPACE NAME READY STATUS RESTARTS AGE kube-system coredns-66bff467f8-8f2r5 1/1 Terminating 1 28d kube-system coredns-66bff467f8-9hq7j 1/1 Running 0 84s kube-system coredns-66bff467f8-fsvdg 1/1 Terminating 2 28d kube-system coredns-66bff467f8-tvrxz 1/1 Running 0 84s kube-system etcd-localhost.localdomain 1/1 Running 3 28d kube-system kube-apis..
-
rm: cannot remove `/var/lib/kubelet/pods/5c17f0a0-845d-4cd8-a1d6-16167ca50c25/volumes/kubernetes.io~secret/coredns-token-rbscr': 장치나 자원이 동작 중IT 2020. 7. 1. 16:31
device or resource busy pod rm: cannot remove `/var/lib/kubelet/pods/5c17f0a0-845d-4cd8-a1d6-16167ca50c25/volumes/kubernetes.io~secret/coredns-token-rbscr': 장치나 자원이 동작 중 #해결 마운트가 되어있어서 삭제가 안됐다. #df -HT #umount $(df -HT | grep '/var/lib/kubelet/pods' | awk '{print $7}')
-
Failed to get system container stats for "/system.slice/kubelet.service": failed to get cgroup stats for "/system.slice/kubelet.service" failed to find cgroups of kubelet - cpu and memory cgroupIT 2020. 7. 1. 12:04
failed to find cgroups of kubelet - cpu and memory cgroup # 해결 vi /etc/systemd/system/kubelet.service.d/11-cgroups.conf [Service] CPUAccounting=true MemoryAccounting=true vi /etc/sysconfig/kubelet KUBELET_CGROUP_ARGS=--cgroup-driver=systemd --runtime-cgroups=/systemd/system.slice --kubelet-cgroups=/systemd/system.slice [root@localhost ~]# vi /usr/lib/systemd/system/kubelet.service [Unit] Descrip..
-
kube-system kube-dns:dns 403IT 2020. 7. 1. 11:48
kubectl cluster-info #에러메시지 kind "Status" apiVersion "v1" metadata {} status "Failure" message "services \"kube-dns:dns\" is forbidden: User \"system:anonymous\" cannot get resource \"services/proxy\" in API group \"\" in the namespace \"kube-system\"" reason "Forbidden" details name "kube-dns:dns" kind "services" code 403 #해결 kubectl create clusterrolebinding cluster-system-anonymous --clusterr..
-
쿠버네티스 삭제IT 2020. 7. 1. 11:13
#한 개 pod 삭제 kubectl delete pods nginx # 서비스 삭제 kubectl delete service my-service #ReplicaSet 삭제 kubectl delete rs kubernetes-bootcamp-6f6656d949 #ingress 삭제 kubectl delete ingress eks-21 쿠버네티스 로그 분석 kubectl logs nginx-service1-124124 -n kube-system kubectl describe service nginx-service kubectl get events --field-selector type=Warning #조회 kubectl auth can-i --list --as=system:serviceaccount:defa..