2.1 Enable Remote Access to CoreDNS
Casablanca
This installation step is required for Casablanca in order to enable automatic DNS updates on failover.
Setup required to test DnsSwitch functionality
These steps are used to test DNSSwitch functionality within PROM POD
1. Place dnsSwitch.bash on core-dns master under /home/ubuntu
2.Following are the steps to create ssh key for remote core-dns connection
a. As a root user, execute below command on coredns master (make sure to use the key name as coredns.key) :
$ ssh-keygen -t rsa -f coredns.key (hit Enter key for the prompts)
This creates two files: coredns.key and coredns.key.pub
b. verify below command works for root user without any prompts(because the key was added with root user):
ssh -i coredns.key root@<corednsHost>
c. Copy coredns.key and coredns.key.pub files to /dockerdata-nfs/coredns on all Master sites
3. Make sure kubectl works on core-dns master
#kubernetes cluster was installed using ubuntu, hence below does not work
root@core-dns-master:/home/ubuntu# kubectl get pods -n onap
The connection to the server localhost:8080 was refused - did you specify the right host or port?
#copy kube config using root user to /root to make it work
root@core-dns-master:/home/ubuntu# cp /home/ubuntu/.kube/ /root
#verify kubectl works from root user
root@core-dns-master:~# kubectl get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system coredns-7fd6694686-dnwt7 1/1 Running 2 11d
kube-system coredns-7fd6694686-jrj92 1/1 Running 2 11d
kube-system etcd-core-dns-master 1/1 Running 2 12d
kube-system kube-apiserver-core-dns-master 1/1 Running 10 12d
kube-system kube-controller-manager-core-dns-master 1/1 Running 8 12d
kube-system kube-proxy-j4wlv 1/1 Running 2 12d
kube-system kube-proxy-q74fc 1/1 Running 2 12d
kube-system kube-scheduler-core-dns-master 1/1 Running 7 12d
kube-system tiller-deploy-84f4c8bb78-skvlp 1/1 Running 2 12d
kube-system weave-net-lq4ls 2/2 Running 7 12d
kube-system weave-net-rm6z4 2/2 Running 15 12d
6. Execute sdnc.makeActive script from Site A or Site B to trigger manual failover and DNSSwitch
root@k8s-master:/home/ubuntu# ./sdnc.makeActive
7. You may verify the logs on core-dns master :