Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d837507f10 |
@@ -1,36 +1,4 @@
|
|||||||
---
|
---
|
||||||
## 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
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
|
|||||||
@@ -75,11 +75,10 @@ jobs:
|
|||||||
|
|
||||||
|
|
||||||
- name: k8s Check and Apply New Deployment
|
- name: k8s Check and Apply New Deployment
|
||||||
uses: http://139.9.216.111:3000/bamanker/kubectl@master
|
uses: http://139.9.216.111:3000/bamanker/steevchen-kubectl@master
|
||||||
env:
|
|
||||||
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
|
|
||||||
with:
|
with:
|
||||||
command: apply -f deployment.yml
|
config: ${{ secrets.KUBE_CONFIG }}
|
||||||
|
command: apply -f http://${{ secrets.DEVOPS_GITEA_TOKEN }}@139.9.216.111:3000/bamanker/myk3sTest/src/branch/master/.deploy/deployment.yml
|
||||||
# - name: k8s Update Deployment
|
# - name: k8s Update Deployment
|
||||||
# uses: http://139.9.216.111:3000/bamanker/kubectl@master
|
# uses: http://139.9.216.111:3000/bamanker/kubectl@master
|
||||||
# env:
|
# env:
|
||||||
|
|||||||
Reference in New Issue
Block a user