File tree Expand file tree Collapse file tree 5 files changed +24
-7
lines changed Expand file tree Collapse file tree 5 files changed +24
-7
lines changed Original file line number Diff line number Diff line change 11apiVersion : extensions/v1beta1
22kind : Ingress
33metadata :
4- name : kubernetes-dashboard
4+ name : kubernetes-api
55 namespace : default
66 annotations :
77 kubernetes.io/ingress.class : traefik
Original file line number Diff line number Diff line change @@ -167,6 +167,7 @@ spec:
167167 - name : https
168168 port : 443
169169 targetPort : 8443
170+ nodePort : 30777
170171 - name : http
171172 port : 80
172173 targetPort : 9090
Original file line number Diff line number Diff line change @@ -17,12 +17,15 @@ kind: Ingress
1717metadata :
1818 name : traefik-web-ui
1919 namespace : kube-system
20+ annotations :
21+ kubernetes.io/ingress.class : traefik
22+ ingress.kubernetes.io/secure-backends : " true"
23+ traefik.frontend.rule.type : PathPrefixStrip
2024spec :
2125 rules :
22- - host : traefik-ui.minikube
23- http :
26+ - http :
2427 paths :
25- - path : /
28+ - path : /traefik-web-ui
2629 backend :
2730 serviceName : traefik-web-ui
28- servicePort : web
31+ servicePort : " web"
Original file line number Diff line number Diff line change @@ -22,6 +22,9 @@ nodes: definedInOnBeforeInstall
2222
2323skipNodeEmails: true
2424
25+ globals:
26+ dashboardUrl: https://${env.domain}/kubernetes-dashboard/
27+
2528onInstall:
2629 - block-masters-scaling
2730 - init-main-master
@@ -42,6 +45,14 @@ onInstall:
4245 - deploy
4346 - install-conf-addon
4447 - remove-attr
48+ - if ('${env.protocol}' == 'http'):
49+ - api: env.control.AddEndpoint
50+ nodeId: ${nodes.cp.master.id}
51+ privatePort: 30777
52+ protocol: TCP
53+ name: Dashboard Self-Sighed HTTPS
54+ - setGlobals:
55+ dashboardUrl: https://node${nodes.cp.master.id}-${env.domain}:${response.object.publicPort}/
4556
4657onAfterScaleOut[cp]:
4758 forEach(event.response.nodes):
@@ -118,7 +129,10 @@ actions:
118129
119130 connect-workers:
120131 cmd[${this}]: |-
132+ rm -f /etc/machine-id
133+ systemd-machine-id-setup
121134 systemctl daemon-reload > /dev/null 2>&1
135+ systemctl restart kubelet.service
122136 $(cat /var/lib/connect/settings) --ignore-preflight-errors=swap > /dev/null 2>&1
123137 sleep 5
124138 iptables -I INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
@@ -268,5 +282,4 @@ actions:
268282 action=$([ "${settings.remote}" == "true" ] && echo "apply" || echo "delete")
269283 kubectl $action -f ${baseUrl}/addons/api-ingress.yaml
270284
271-
272285success: /text/success.md
Original file line number Diff line number Diff line change 1- Enter [ Kubernetes dashboard] ( https://${env.domain}/kubernetes-dashboard/ ) or [ Remote API Endpoint] ( https ://${env.domain}/api/) using the Access Token:
1+ Enter [ Kubernetes dashboard] ( ${globals.dashboardUrl} ) or [ Remote API Endpoint] ( ${env.protocol} ://${env.domain}/api/) using the Access Token:
22
33 ``` ${globals.token} ```
44
You can’t perform that action at this time.
0 commit comments