mitao
2025-02-21 31573d6180d15ef65ed0df9c2732495f40b12663
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: service-community
spec:
  selector:
    matchLabels:
      app: springcloud-service-community
 
  replicas: 2
 
  template:
    metadata:
      labels:
        app: springcloud-service-community
    spec:
      containers:
        - name: community-instance
          image: registry.cn-chengdu.aliyuncs.com/panzhihua/service_community:v1
          imagePullPolicy: Always
          env:
            - name: EUREKA_URL
              value: eureka-server
            - name: CONFIG_URL
              value: config-server
          ports:
            - containerPort: 8291
      imagePullSecrets:
        - name: hhf
 
 
---
kind: Service
apiVersion: v1
metadata:
  name: service-community
spec:
  selector:
    app: springcloud-service-community
  ports:
    - protocol: TCP
      port: 8291
      targetPort: 8291
  #type: NodePort