Service - Order
apiVersion: v1
kind: Service
metadata:
name: order
namespace: snackbar
labels:
service: order
project: snackbar
spec:
type: NodePort
selector:
service: order
project: snackbar
ports:
- port: 80
targetPort: 8080
Service - Payment
apiVersion: v1
kind: Service
metadata:
name: payment
namespace: snackbar
labels:
service: payment
project: snackbar
spec:
type: ClusterIP
selector:
service: payment
project: snackbar
ports:
- port: 80
targetPort: 8080
Deployment
는 11강과 동일
order, payment Servcie 리소스 상세 조회
kubectl get svc -l project=snackbar -n snackbar -o wide
외부에서 NodePort로 방화벽 해제 설정
- GCP
gcloud compute firewall-rules create <name> --allow tcp:<port>