comparison dns.py @ 79:3f7d4626234c

fix kubectl call
author drewp@bigasterisk.com
date Sat, 18 Jun 2022 13:40:55 -0700
parents 136d86d06ce6
children bf1573dd1947
comparison
equal deleted inserted replaced
78:fb68881b79a0 79:3f7d4626234c
9 def prepare_dhcp_hosts(): 9 def prepare_dhcp_hosts():
10 lanscape_ip = subprocess.check_output([ 10 lanscape_ip = subprocess.check_output([
11 'kubectl', 11 'kubectl',
12 'get', 12 'get',
13 'svc', 13 'svc',
14 '--field-selector=metadata.name=lanscape', 14 'lanscape',
15 "-o=jsonpath={.items[0].spec.clusterIP}", 15 "-o=jsonpath={.spec.clusterIP}",
16 ], 16 ],
17 encoding='ascii') 17 encoding='ascii')
18 url = f'http://{lanscape_ip}/dnsConfig' 18 url = f'http://{lanscape_ip}/dnsConfig'
19 resp = requests.get(url) 19 resp = requests.get(url)
20 resp.raise_for_status() 20 resp.raise_for_status()