Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,21 @@ Forwarding from 127.0.0.1:3306 -> 3306
Forwarding from [::1]:3306 -> 3306
```

If you prefer direct access without port forwarding, update `mysql-service.yaml`
to use a `NodePort` service. The example in this repository exposes port `3306`
on node port `30306`:

```
spec:
type: NodePort
ports:
- protocol: TCP
port: 3306
targetPort: 3306
nodePort: 30306
```
After applying the updated service you can connect using `<node-ip>:30306`.

![Image](https://github.com/user-attachments/assets/943d18d8-2cfc-478e-91ed-a7cd7b1dcf23)

#### Docker Desktop
Expand Down
3 changes: 2 additions & 1 deletion biometric-nbi/src/kubernetes/mysql-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ metadata:
name: mysql
namespace: mysql
spec:
type: NodePort
# kubectl port-forward mysql-58b7767464-dgpf4 3306:3306
ports:
- protocol: TCP
port: 3306
targetPort: 3306
nodePort: 30306
selector:
app: mysql
clusterIP: None