首次提交:初始化项目
This commit is contained in:
34
009-基础设施/001-pg16/k8s/service.yaml
Normal file
34
009-基础设施/001-pg16/k8s/service.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: pg16
|
||||
namespace: infrastructure
|
||||
labels:
|
||||
app: pg16
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 5432
|
||||
targetPort: 5432
|
||||
protocol: TCP
|
||||
name: postgres
|
||||
selector:
|
||||
app: pg16
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: pg16-nodeport
|
||||
namespace: infrastructure
|
||||
labels:
|
||||
app: pg16
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
- port: 5432
|
||||
targetPort: 5432
|
||||
nodePort: 30432
|
||||
protocol: TCP
|
||||
name: postgres
|
||||
selector:
|
||||
app: pg16
|
||||
Reference in New Issue
Block a user