Research for more than an hour, get out of order

First modification In the console, then kubectl get deployment -n ns -o yaml; yaml then the module output yaml python format. It can be the direct cause of the console by the command to take effect

kubectl patch deployment centos7 -n public -p '{"spec":{"template":{"spec":{"dnsPolicy": "None", "dnsConfig": {"nameservers": ["169.254.20.10"], "searches": ["default.svc.cluster.local", "svc.cluster.local", "cluster.local"], "options": [{"name": "ndots", "value": "2"}]}}}}}'

Guess you like

Origin blog.51cto.com/12131824/2464090