Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.

Commit d2080ed

Browse files
committed
Expose hostPort for kibana, elasticsearch, fleet without needing ingress
This is nice for local development where you don't need an ingress and are relatively sure that the host system has the required ports available to bind to. Signed-off-by: Adam Stokes <51892+adam-stokes@users.noreply.github.com>
1 parent c9e3054 commit d2080ed

4 files changed

Lines changed: 15 additions & 10 deletions

File tree

cli/config/kubernetes/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ kind create cluster
1313
kubectl apply -k base
1414
```
1515

16-
## Local Ingress
16+
This will allow you to visit `http://localhost:5601` using username: `elastic` password: `changeme` to login
17+
18+
## Local Ingress (Optional)
19+
20+
If a local ingress is preferred, apply the following to setup nginx-ingress
1721

1822
```
1923
kubectl apply -k overlays/local

cli/config/kubernetes/base/kibana/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ spec:
2424
value: elastic
2525
- name: ELASTICSEARCH_PASSWORD
2626
value: changeme
27-
2827
ports:
2928
- containerPort: 5601
29+
hostPort: 5601
3030
name: http
3131
livenessProbe:
3232
tcpSocket:

cli/config/kubernetes/kind.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,12 @@ nodes:
1515
- containerPort: 443
1616
hostPort: 443
1717
protocol: TCP
18+
- containerPort: 5601
19+
hostPort: 5601
20+
protocol: TCP
21+
- containerPort: 9200
22+
hostPort: 9200
23+
protocol: TCP
24+
- containerPort: 8220
25+
hostPort: 8220
26+
protocol: TCP

cli/config/kubernetes/overlays/local/nginx-ingress.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -340,14 +340,6 @@ spec:
340340
- --validating-webhook-certificate=/usr/local/certificates/cert
341341
- --validating-webhook-key=/usr/local/certificates/key
342342
- --publish-status-address=localhost
343-
securityContext:
344-
capabilities:
345-
drop:
346-
- ALL
347-
add:
348-
- NET_BIND_SERVICE
349-
runAsUser: 101
350-
allowPrivilegeEscalation: true
351343
env:
352344
- name: POD_NAME
353345
valueFrom:

0 commit comments

Comments
 (0)