1、dubbo_rc文件如下:

cat dubbo_rc.yaml
apiVersion: v1
kind: ReplicationController
metadata:
  name: dubboadmin
spec:
   replicas: 1
   selector:
     app: dubboadmin
   template:
     metadata:
       labels:
         app: dubboadmin
     spec:
       containers:
       - name: dubboadmin
         image: 192.168.1.201:5000/dubboadmin   #镜像地址
         ports:
         - containerPort: 8080

2、dubbo_svc文件:

cat dubbo_svc.yaml
apiVersion: v1
kind: Service
metadata:
  name: dubboadmin
spec:
  ports:
   - port: 8080
  selector:
    app: dubboadmin
Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐