https://github.com/kelseyhightower/kubernetes-the-hard-way/blob/master/docs/12-dns-addon.md
CoreDNS 설치가 정상적으로 잘되는지 체크해보자
[root@master01 ~]# kubectl apply -f https://storage.googleapis.com/kubernetes-the-hard-way/coredns-1.7.0.yaml
serviceaccount/coredns created
clusterrole.rbac.authorization.k8s.io/system:coredns created
clusterrolebinding.rbac.authorization.k8s.io/system:coredns created
configmap/coredns created
deployment.apps/coredns created
service/kube-dns created
yum install -y systemd-resolved
systemctl start systemd-resolved
systemctl enable systemd-resolved
[root@master01 ~]# kubectl get pods -l k8s-app=kube-dns -n kube-system
NAME READY STATUS RESTARTS AGE
coredns-5677dc4cdb-6xgqj 1/1 Running 0 10m
coredns-5677dc4cdb-rh946 1/1 Running 0 10m
[root@master01 ~]# kubectl run busybox --image=busybox:1.28 --command -- sleep 3600
pod/busybox created
[root@master01 ~]# kubectl get pods -l run=busybox
NAME READY STATUS RESTARTS AGE
busybox 1/1 Running 0 7s
[root@master01 ~]# POD_NAME=$(kubectl get pods -l run=busybox -o jsonpath="{.items[0].metadata.name}")
[root@master01 ~]# kubectl exec -ti $POD_NAME -- nslookup kubernetes
Server: 10.32.0.10
Address 1: 10.32.0.10
'kubernetes > Install hardway' 카테고리의 다른 글
[HARDWAY] 99.Smoke Test (0) | 2020.12.02 |
---|---|
[HARDWAY] 10. Configuring kubectl for Remote Access (0) | 2020.12.02 |
[HARDWAY] 09.Bootstrapping the Kubernetes Worker Nodes (0) | 2020.12.02 |
[HARDWAY] 08.Bootstrapping the Kubernetes Control Plane (0) | 2020.12.02 |
[HARDWAY] 07.Bootstrapping the etcd Cluster (0) | 2020.12.02 |