交付dubbo-demo-web
2021-02-11 08:18
标签:ogr nav RoCE title png nas pre war targe 我们这里的dubbo-consumer是dubbo-demo-service的消费者: 我们之前已经在jenkins配置好了流水线,只需要填写参数就行了。 由于dubbo-consumer用的gitee的私有仓库,需要添加公钥,这里大家可以自己找个client服务来做实验。 下面是我们通过jenkins构建的镜像,已经上传到我们的harbor私有仓库当中了:
1、dp.yaml 红色部分根据实际镜像tag修改 # mkdir /data/k8s-yaml/dubbo-consumer # cd /data/k8s-yaml/dubbo-consumer # vi dp.yaml svc ingress # kubectl apply -f http://k8s-yaml.od.com/dubbo-consumer/dp.yaml # kubectl apply -f http://k8s-yaml.od.com/dubbo-consumer/svc.yaml # kubectl apply -f http://k8s-yaml.od.com/dubbo-consumer/ingress.yaml # kubectl get pod -n app [root@hdss7-22 data]# kubectl logs dubbo-demo-consumer-c6f7f89f4-q9ltz -n app
交付dubbo-demo-web 标签:ogr nav RoCE title png nas pre war targe 原文地址:https://www.cnblogs.com/sseban/p/13042633.html1.jenkins构建
2.准备资源配置清单:
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
name: dubbo-demo-consumer
namespace: app
labels:
name: dubbo-demo-consumer
spec:
replicas: 1
selector:
matchLabels:
name: dubbo-demo-consumer
template:
metadata:
labels:
app: dubbo-demo-consumer
name: dubbo-demo-consumer
spec:
containers:
- name: dubbo-demo-consumer
image: harbor.od.com/app/dubbo-demo-consumer:master_191201_1600
ports:
- containerPort: 8080
protocol: TCP
- containerPort: 20880
protocol: TCP
env:
- name: JAR_BALL
value: dubbo-client.jar
imagePullPolicy: IfNotPresent
imagePullSecrets:
- name: harbor
restartPolicy: Always
terminationGracePeriodSeconds: 30
securityContext:
runAsUser: 0
schedulerName: default-scheduler
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
maxSurge: 1
revisionHistoryLimit: 7
progressDeadlineSeconds: 600
kind: Service
apiVersion: v1
metadata:
name: dubbo-demo-consumer
namespace: app
spec:
ports:
- protocol: TCP
port: 8080
targetPort: 8080
selector:
app: dubbo-demo-consumer
kind: Ingress
apiVersion: extensions/v1beta1
metadata:
name: dubbo-demo-consumer
namespace: app
spec:
rules:
- host: demo.od.com
http:
paths:
- path: /
backend:
serviceName: dubbo-demo-consumer
servicePort: 8080
3应用资源配置清单:
4.添加个dns解析,来验证:
上一篇:考据癖——发现一个很有趣的网站
下一篇:WebSocket connection to 'ws://192.168.3.195:9527/sockjs-node/564/fjaw2vh2/websocket'