From 31639a80494f87185c51e697fc6ae7e350e4a117 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 2 Aug 2025 14:02:46 +0330 Subject: [PATCH] added nodeport k8s in svc --- .../Kubernetes/workloads/09-Services.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Containerization & Orchestration/Kubernetes/workloads/09-Services.md b/Containerization & Orchestration/Kubernetes/workloads/09-Services.md index a4a3812..402d620 100644 --- a/Containerization & Orchestration/Kubernetes/workloads/09-Services.md +++ b/Containerization & Orchestration/Kubernetes/workloads/09-Services.md @@ -107,6 +107,7 @@ spec: > 🧠 **Tip:** Use `kubectl describe svc ` to inspect the service and verify connectivity. + ```yaml apiVersion: v1 kind: Service @@ -124,3 +125,20 @@ spec: port: 80 targetPort: 8080 ``` + +```yaml +apiVersion: v1 +kind: Service +metadata: + name: db-svc + namespace: db +spec: + type: NodePort + ports: + - name: sql + port: 3306 + targetPort: 3306 + nodePort: 30000 + selector: + app: db +``` \ No newline at end of file