Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d2d3e9e3f5 | ||
|
|
95edbd85aa | ||
|
|
255baf2f3d | ||
|
|
713a47c337 | ||
|
|
044ddf9ef1 |
@@ -1,34 +1,3 @@
|
||||
## k8s默认是访问不了外部服务的,需要代理,以mysql和redis为例,代理myservice名称到192.168.0.100,配置文件中对应的ip修改为myservice
|
||||
#apiVersion: v1
|
||||
#kind: Endpoints
|
||||
#metadata:
|
||||
# name: myservice
|
||||
#subsets:
|
||||
# - addresses:
|
||||
# - ip: 192.168.0.100
|
||||
# ports:
|
||||
# - port: 6379
|
||||
# protocol: TCP
|
||||
# name: redis
|
||||
# - port: 3306
|
||||
# protocol: TCP
|
||||
# name: mysql
|
||||
#---
|
||||
#apiVersion: v1
|
||||
#kind: Service
|
||||
#metadata:
|
||||
# name: myservice
|
||||
#spec:
|
||||
# ports:
|
||||
# - port: 6379
|
||||
# targetPort: 6379
|
||||
# protocol: TCP
|
||||
# name: redis
|
||||
# - port: 3306
|
||||
# targetPort: 3306
|
||||
# protocol: TCP
|
||||
# name: mysql
|
||||
#
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
@@ -46,7 +15,7 @@ spec:
|
||||
app: myk3s-test
|
||||
spec:
|
||||
containers:
|
||||
- image: ${env.REGISTRY}/${env.IMAGE_NAME}:${steps.datetime.outputs.datetime}
|
||||
- image: registry.cn-chengdu.aliyuncs.com/bamanker/myk3stest:lastest
|
||||
name: myk3s-test
|
||||
imagePullPolicy: Always
|
||||
readinessProbe:
|
||||
@@ -59,9 +28,7 @@ spec:
|
||||
- containerPort: 9090
|
||||
imagePullSecrets:
|
||||
- name: dockerhub-id
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
|
||||
Reference in New Issue
Block a user