Compare commits

..

3 Commits

Author SHA1 Message Date
bamanker
e7e274241d 修改deployment.yml文件格式
Some checks failed
Build Push and Deploy Image / build (push) Failing after 1m29s
2025-12-25 16:38:58 +08:00
bamanker
60be5bda29 修改deployment.yml文件格式 2025-12-25 16:37:47 +08:00
bamanker
dad481d5f6 修改deployment.yml文件格式 2025-12-25 16:36:37 +08:00

View File

@@ -1,3 +1,34 @@
## 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
@@ -28,7 +59,9 @@ spec:
- containerPort: 9090
imagePullSecrets:
- name: dockerhub-id
---
apiVersion: v1
kind: Service
metadata: