https://kubernetes.io/ko/docs/concepts/services-networking/service/#type-nodeport
apiVersion: v1 kind: Service metadata: name: my-service spec: type: NodePort selector: app.kubernetes.io/name: MyApp ports: # ๊ธฐ๋ณธ์ ์ผ๋ก ๊ทธ๋ฆฌ๊ณ ํธ์์ `targetPort` ๋ `port` ํ๋์ ๋์ผํ ๊ฐ์ผ๋ก ์ค์ ๋๋ค. - port: 80 # ์๋น์ค์ ํฌํธ (๋ก๋๋ฐธ๋ฐ์๊ฐ ๋ฐ๋ก ๋ณด๋ ํฌํธ?) targetPort: 80 # ํฌ๋์ ํฌํธ # ์ ํ์ ํ๋ # ๊ธฐ๋ณธ์ ์ผ๋ก ๊ทธ๋ฆฌ๊ณ ํธ์์ ์ฟ ๋ฒ๋คํฐ์ค ์ปจํธ๋กค ํ๋ ์ธ์ ํฌํธ ๋ฒ์์์ ํ ๋นํ๋ค(๊ธฐ๋ณธ๊ฐ: 30000-32767) nodePort: 30007
gcloud compute firewall-rules create http-go-svc-rule --allow=tcp:30001
: gcp ๋ฐฉํ๋ฒฝ ๋ฃฐ ์ถ๊ฐ
apiVersion: v1 kind: Service metadata: name: my-service spec: selector: app.kubernetes.io/name: MyApp ports: - protocol: TCP port: 80 targetPort: 9376 clusterIP: 10.0.171.239 type: LoadBalancer status: loadBalancer: ingress: - ip: 192.0.2.127