• 카테고리

    질문 & 답변
  • 세부 분야

    데브옵스 · 인프라

  • 해결 여부

    미해결

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

20.06.09 12:50 작성 조회수 226

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

ssen님의 프로필

ssen

질문자

2020.06.10

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

1

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

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

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

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

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