#!/bin/bash modify_ingress_nginx_host_network(){ echo "start to modify hostnetwork to false !" kubectl patch daemonset nginx-ingress-controller -n ingress-nginx --patch '{"spec":{"template":{"spec":{"hostNetwork": false}}}}' echo "" kubectl get daemonset -n ingress-nginx nginx-ingress-controller -o jsonpath='{.spec.template.spec.hostNetwork}' } build_for_ingress_nginx_node_port(){ echo "start to write ingress nginx node port service !" mkdir -p /root/wdd/install/ cat >>/root/wdd/install/k8s-ingress-nginx.yaml<