mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-03-07 19:51:15 -03:30
Added example how to expose k8s dashboard
This commit is contained in:
17
examples/kubernetes/expose-services/README.md
Normal file
17
examples/kubernetes/expose-services/README.md
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
Examples how to expose k8s services
|
||||||
|
===================================
|
||||||
|
|
||||||
|
* Edit `kubernetes-dashboard.yaml` and update `externalIPs` to the list of external IPs of your k8s minions
|
||||||
|
|
||||||
|
* Run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
kubectl create -f kubernetes-dashboard.yaml --namespace=kube-system
|
||||||
|
```
|
||||||
|
|
||||||
|
* Access:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl $ANY_MINION_EXTERNAL_IP:9090
|
||||||
|
```
|
||||||
|
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: dashboard-frontend
|
||||||
|
labels:
|
||||||
|
app: dashboard-frontend
|
||||||
|
tier: frontend
|
||||||
|
spec:
|
||||||
|
externalIPs:
|
||||||
|
- 10.210.0.12
|
||||||
|
- 10.210.0.13
|
||||||
|
- 10.210.0.14
|
||||||
|
- 10.210.0.15
|
||||||
|
- 10.210.0.16
|
||||||
|
- 10.210.0.17
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 9090
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: 9090
|
||||||
|
selector:
|
||||||
|
app: kubernetes-dashboard
|
||||||
Reference in New Issue
Block a user