강의

멘토링

로드맵

Inflearn brand logo image

인프런 커뮤니티 질문&답변

Xtar님의 프로필 이미지
Xtar

작성한 질문수

대세는 쿠버네티스 (초급~중급편)

설치 - Case3 - 실습

dns 관련 질문 다시 올립니다...

작성

·

391

1

선생님 그럼 메타데이타 하위 레벨에 관한 항목과 스펙의 넬렉터 하위 matchlabels 등은 도큐먼트나 레퍼런스 참고해서 임의로 써도 무방한지요? 

그리고 

문제는 디플로이먼트 생성하는데 

name: nginx-dns / exposed via a service : nignx-dns 

- ensure that the service & pod are accessible via their respective DNS records

- the container within any pod running as a part of this deployment should use the nginx image

Next use the utility nslookup to look up the DNS records of the service & pod and write the output to /opt/KUNW00601/service.dns  and /opt/KUNW00601/pod.dns respectively. Ensure you use the busybox:1.28 image for any testing, as the latest release has an upstream bug which impacts the use of nslookup.

위 문제에 대한 디플로이먼트 생성후 

kubectl expose deployment nginx-dns --port=8080 --name=nginx-dns

kubectl get pods nginx-dns-5d6bd489d5-n4sx4 -o wide

 kubectl run curl1 --image=nginx/busyboxplus:curl -i --tty

#nslookup 20.111.156.71

#nslookup dns-svc

kubectl delete deployments.apps curl

요렇게 명령어 입력하는 것이 정확한지 궁금하구요... 해당 컨테이너로 들어가서 nslookup 입력한 후 조회결과를  /opt/KUNW00601/service.dns 이곳에 저장해야 하는데 어떤 명령어를 입력하는게 좋을지 궁금합니다...ㅠㅠ

제가 모르는게 많아서 죄송하고,  자세한 답변 알려주셔서 감사합니다!!!

답변 2

1

Xtar님의 프로필 이미지
Xtar
질문자

네 이해 됬습니다. 감사합니다!!

1

일프로님의 프로필 이미지
일프로
지식공유자

네 문제에 명시되지 않은 내용은 필요에 따라 임의대로 작성해도 무방할듯 싶습니다.

그리고 dns 문제는 제 영상내용대로 하시면 되는데요.

문제에는 busybox:1.28을 사용하라고 했지만 문제의  취지는 service와 pod의 dns 내용을 조회하는 목적이기 때문에 다른 이미지를 사용해도 됩니다.

주어진 이미지로 사용하셔도 되고요.

마지막 dns내용 조회해서 주어진 파일에 넣는건 내용을 드래그해서 복사한후 vi로 파일을 만들어서 붙여 넣르시면 되세요~!

Xtar님의 프로필 이미지
Xtar

작성한 질문수

질문하기