작성
·
1.7K
0
질문 답변을 제공하지만, 강의 비용에는 Q&A는 포함되어 있지 않습니다.
다만 실습이 안되거나, 잘못된 내용의 경우는 알려주시면 가능한 빠르게 조치하겠습니다!
[질문 전 답변]
1. 강의에서 다룬 내용과 관련된 질문인가요? [예]
2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? [예]
3. 질문 잘하기 법을 읽어보셨나요? [예]
(https://www.inflearn.com/blogs/1719)
4. 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요.
5. vagrant up
에서 발생하는 문제는 주로 호스트 시스템(Windows, MacOS)과 연관된 다양한 조건에 의해 발생합니다. 따라서 이를 모두 제가 파악할 수 없어서 해결이 어렵습니다. vagrant up으로 진행이 어렵다면 제공해 드리는 가상 머신(VM) 이미지를 import해서 진행하시기 바랍니다.
(https://www.inflearn.com/questions/992407/comment/281901)
[질문 하기]
안녕하세요 예전에 강의를 들을 때에는 당장 쓸 일이 없어서 듣고 까먹었다가 이제 쓸 일이 생겨서 다시 공부 중인데 따라서 진행하다가 막혀서 질문드립니다.
`6.2 쿠버네티스 기본 오브젝트`강의의 8분 지점에서
root@cp-k8s:pwd
/root/_Lecture_k8s_starter.kit/ch6/6.2
root@cp-k8s:~/_Lecture_k8s_starter.kit/ch6/6.2# k apply -f ./dpy-chk-log.yaml
# 위의 명령어를 수행
root@cp-k8s:~/_Lecture_k8s_starter.kit/ch6/6.2# k get pods
NAME READY STATUS RESTARTS AGE
dpy-chk-log-6b765b4569-5v6d7 0/1 ContainerCreating 0 70m
dpy-chk-log-6b765b4569-9944j 0/1 ContainerCreating 0 70m
dpy-chk-log-6b765b4569-rrj9p 0/1 ContainerCreating 0 70m
위와 같이 1시간이 지나도 생성이 안되는 문제 발생.
이전까지의 강의를 다시 들으면서 했을 때 다른 deployment는 apply로 했을 때 정상적으로 생성이 되었습니다.
혹시 강의가 업데이트 되면서 따로 수정해야 하는 사항이 있었을까요?
root@cp-k8s:~/_Lecture_k8s_starter.kit/ch6/6.2# ls /
bin cdrom dev home lib32 libx32 media nfs_shared proc run srv sys usr
boot core etc lib lib64 lost+found mnt opt root sbin swap.img tmp var
root@cp-k8s:~/_Lecture_k8s_starter.kit/ch6/6.2# ls /nfs_shared/
log
위와 같이 이전에 실행해야하는 스크립트는 수행했습니다.
아래 현재 상황을 추가 작성합니다.
root@cp-k8s:~/_Lecture_k8s_starter.kit/ch6/6.2# cat /etc/exports
# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check)
#
/nfs_shared/log 192.168.1.0/24(rw,sync,no_root_squash)
root@cp-k8s:~/_Lecture_k8s_starter.kit/ch6/6.2# k describe pods
Name: dpy-chk-log-6b765b4569-5v6d7
Namespace: default
Priority: 0
Service Account: default
Node: w2-k8s/192.168.1.102
Start Time: Mon, 05 Aug 2024 16:32:32 +0900
Labels: app=dpy-chk-log
pod-template-hash=6b765b4569
Annotations: <none>
Status: Pending
IP:
IPs: <none>
Controlled By: ReplicaSet/dpy-chk-log-6b765b4569
Containers:
dpy-chk-log:
Container ID:
Image: sysnet4admin/chk-log
Image ID:
Port: <none>
Host Port: <none>
State: Waiting
Reason: ContainerCreating
Ready: False
Restart Count: 0
Environment: <none>
Mounts:
/audit from nfs-vol (rw)
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-v2gdf (ro)
Conditions:
Type Status
PodReadyToStartContainers False
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
nfs-vol:
Type: NFS (an NFS mount that lasts the lifetime of a pod)
Server: 192.168.1.10
Path: /nfs_shared/log
ReadOnly: false
kube-api-access-v2gdf:
Type: Projected (a volume that contains injected data from multiple sources)
TokenExpirationSeconds: 3607
ConfigMapName: kube-root-ca.crt
ConfigMapOptional: <nil>
DownwardAPI: true
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedMount 107s (x43 over 73m) kubelet MountVolume.SetUp failed for volume "nfs-vol" : mount failed: exit status 32
Mounting command: mount
Mounting arguments: -t nfs 192.168.1.10:/nfs_shared/log /var/lib/kubelet/pods/b592c7c9-acfd-4cce-bb83-af99e9dcc186/volumes/kubernetes.io~nfs/nfs-vol
Output: mount.nfs: access denied by server while mounting 192.168.1.10:/nfs_shared/log
Name: dpy-chk-log-6b765b4569-9944j
Namespace: default
Priority: 0
Service Account: default
Node: w1-k8s/192.168.1.101
Start Time: Mon, 05 Aug 2024 16:32:32 +0900
Labels: app=dpy-chk-log
pod-template-hash=6b765b4569
Annotations: <none>
Status: Pending
IP:
IPs: <none>
Controlled By: ReplicaSet/dpy-chk-log-6b765b4569
Containers:
dpy-chk-log:
Container ID:
Image: sysnet4admin/chk-log
Image ID:
Port: <none>
Host Port: <none>
State: Waiting
Reason: ContainerCreating
Ready: False
Restart Count: 0
Environment: <none>
Mounts:
/audit from nfs-vol (rw)
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-qxxmn (ro)
Conditions:
Type Status
PodReadyToStartContainers False
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
nfs-vol:
Type: NFS (an NFS mount that lasts the lifetime of a pod)
Server: 192.168.1.10
Path: /nfs_shared/log
ReadOnly: false
kube-api-access-qxxmn:
Type: Projected (a volume that contains injected data from multiple sources)
TokenExpirationSeconds: 3607
ConfigMapName: kube-root-ca.crt
ConfigMapOptional: <nil>
DownwardAPI: true
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedMount 107s (x43 over 73m) kubelet MountVolume.SetUp failed for volume "nfs-vol" : mount failed: exit status 32
Mounting command: mount
Mounting arguments: -t nfs 192.168.1.10:/nfs_shared/log /var/lib/kubelet/pods/66ecef69-42e7-4075-a6c5-034b30b0f757/volumes/kubernetes.io~nfs/nfs-vol
Output: mount.nfs: access denied by server while mounting 192.168.1.10:/nfs_shared/log
Name: dpy-chk-log-6b765b4569-rrj9p
Namespace: default
Priority: 0
Service Account: default
Node: w3-k8s/192.168.1.103
Start Time: Mon, 05 Aug 2024 16:32:32 +0900
Labels: app=dpy-chk-log
pod-template-hash=6b765b4569
Annotations: <none>
Status: Pending
IP:
IPs: <none>
Controlled By: ReplicaSet/dpy-chk-log-6b765b4569
Containers:
dpy-chk-log:
Container ID:
Image: sysnet4admin/chk-log
Image ID:
Port: <none>
Host Port: <none>
State: Waiting
Reason: ContainerCreating
Ready: False
Restart Count: 0
Environment: <none>
Mounts:
/audit from nfs-vol (rw)
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-v2tdb (ro)
Conditions:
Type Status
PodReadyToStartContainers False
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
nfs-vol:
Type: NFS (an NFS mount that lasts the lifetime of a pod)
Server: 192.168.1.10
Path: /nfs_shared/log
ReadOnly: false
kube-api-access-v2tdb:
Type: Projected (a volume that contains injected data from multiple sources)
TokenExpirationSeconds: 3607
ConfigMapName: kube-root-ca.crt
ConfigMapOptional: <nil>
DownwardAPI: true
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedMount 107s (x43 over 73m) kubelet MountVolume.SetUp failed for volume "nfs-vol" : mount failed: exit status 32
Mounting command: mount
Mounting arguments: -t nfs 192.168.1.10:/nfs_shared/log /var/lib/kubelet/pods/fb54e7a8-70e3-48af-8537-73ab56a9dfaf/volumes/kubernetes.io~nfs/nfs-vol
Output: mount.nfs: access denied by server while mounting 192.168.1.10:/nfs_shared/log
맨 밑에 에러를 보니
Warning FailedMount 107s (x43 over 73m) kubelet MountVolume.SetUp failed for volume "nfs-vol" : mount failed: exit status 32
Mounting command: mount
Mounting arguments: -t nfs 192.168.1.10:/nfs_shared/log /var/lib/kubelet/pods/fb54e7a8-70e3-48af-8537-73ab56a9dfaf/volumes/kubernetes.io~nfs/nfs-vol
Output: mount.nfs: access denied by server while mounting 192.168.1.10:/nfs_shared/log
이런 에러가 있는데 어떻게 처리해야할 지 모르겠어서 질문드립니다. 감사합니다.
답변 1
0
안녕하세요...
아...우분투로 변경되면서 CentOS와 명령어 구성 및 권한 설정이 약간 틀려졌습니다.
그래서 nfs-exporter.sh 를 nfs_exporter.sh로 변경했는데... 여기에는 적용이 안된거 같습니다.
번거로움을 드려서 양해 말씀드립니다. ㅠ ㅠ
rerepo를 하셔서 다시 실행해 보시면 문제 없이 진행이 가능하실 겁니다. ㅠㅠ
혹시 변경된 파일의 비교를 원하시면 다음의 내용을 참조 부탁드립니다.
아하 클론 내려온지 얼마 안 지났어서 다 최신 내용일 줄 알았는데 그 뒤로도 수정되었군요!
강의 및 자료 업데이트해주셔서 항상 감사합니다!