File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
biometric-nbi/src/kubernetes Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,21 @@ Forwarding from 127.0.0.1:3306 -> 3306
5252Forwarding from [::1]:3306 -> 3306
5353```
5454
55+ If you prefer direct access without port forwarding, update ` mysql-service.yaml `
56+ to use a ` NodePort ` service. The example in this repository exposes port ` 3306 `
57+ on node port ` 30306 ` :
58+
59+ ```
60+ spec:
61+ type: NodePort
62+ ports:
63+ - protocol: TCP
64+ port: 3306
65+ targetPort: 3306
66+ nodePort: 30306
67+ ```
68+ After applying the updated service you can connect using ` <node-ip>:30306 ` .
69+
5570![ Image] ( https://github.com/user-attachments/assets/943d18d8-2cfc-478e-91ed-a7cd7b1dcf23 )
5671
5772#### Docker Desktop
Original file line number Diff line number Diff line change @@ -7,11 +7,12 @@ metadata:
77 name : mysql
88 namespace : mysql
99spec :
10+ type : NodePort
1011 # kubectl port-forward mysql-58b7767464-dgpf4 3306:3306
1112 ports :
1213 - protocol : TCP
1314 port : 3306
1415 targetPort : 3306
16+ nodePort : 30306
1517 selector :
1618 app : mysql
17- clusterIP : None
You can’t perform that action at this time.
0 commit comments