#cloud-config write_files: - path: /etc/systemd/system/enable-kube-proxy.service owner: "root:root" permissions: "0644" content: | [Unit] Description=Configure Kubernetes Proxy [Service] Type=oneshot ExecStart=/etc/sysconfig/enable-kube-proxy-minion.sh [Install] WantedBy=multi-user.target - path: /etc/sysconfig/enable-kube-proxy-minion.sh owner: "root:root" permissions: "0755" content: | #!/bin/sh . /etc/sysconfig/heat-params myip=$(curl -s http://169.254.169.254/latest/meta-data/local-ipv4) KUBE_CERTS_PATH=/etc/kubernetes/ssl KUBE_CONFIG_PATH=/etc/kubernetes/config KUBE_PROTOCOL="https" KUBE_CONFIG="${KUBE_CONFIG_PATH}/worker-kubeconfig.yaml" if [ "${TLS_DISABLED}" == "True" ]; then KUBE_PROTOCOL="http" KUBE_CONFIG= fi KUBE_MASTER_URI="${KUBE_PROTOCOL}://${KUBE_MASTER_IP}:${KUBE_API_PORT}" TEMPLATE=/etc/kubernetes/manifests/kube-proxy.yaml mkdir -p $(dirname ${TEMPLATE}) cat > ${TEMPLATE} <