k8s(kubernetes)、helm、kubectl多环境部署apollo
1.数据库使用rds【稳定】【kubernetes内搭建数据库不稳定】2.初始化数据库【fat环境】[ 配置fat环境values.yaml]configdb:name: apollo-configdb# apolloconfigdb host【数据库地址rds的type为ExternalName】#此处要注意 rds 地址host: rm-xxx.mysql.rds.aliyuncs.com#此
·
一、数据库使用rds【稳定】【kubernetes内搭建数据库不稳定】
二、.初始化数据库
三、多环境配置
apollo-service-apollo-adminservice
apollo-service-apollo-configservice
apollo-service-apollo-configdb
【fat环境】
[ 配置fat环境values.yaml ]
configdb:
name: apollo-configdb
# apolloconfigdb host【数据库地址rds的type为ExternalName】
#此处要注意 rds 地址
host: rm-xxx.mysql.rds.aliyuncs.com
#此处要注意
port: 3306
#此处要注意 fat环境对应数据库名称
dbName: xxx
# apolloconfigdb user name
#此处要注意 账号
userName: xxx
# apolloconfigdb password
#此处要注意 密码
password: xxx
connectionStringProperties: characterEncoding=utf8
service:
# enabled 与 type
#此处要注意
enabled: true
fullNameOverride: ""
port: 3306
#此处要注意 如果你也是rds则要修改为如下,如果不是rds请看具体配置说明
type: ExternalName
configService:
name: apollo-configservice
fullNameOverride: ""
replicaCount: 2
containerPort: 8080
image:
repository: apolloconfig/apollo-configservice
tag: ""
pullPolicy: IfNotPresent
imagePullSecrets: []
service:
fullNameOverride: ""
port: 8080
targetPort: 8080
#此处要注意 需要设置外部连接时要设置为此类型
type: NodePort
ingress:
enabled: false
annotations: { }
hosts:
- host: ""
paths: [ ]
tls: [ ]
liveness:
initialDelaySeconds: 100
periodSeconds: 10
readiness:
initialDelaySeconds: 30
periodSeconds: 5
config:
# spring profiles to activate
profiles: "github,kubernetes"
# override apollo.config-service.url: config service url to be accessed by apollo-client
configServiceUrlOverride: ""
# override apollo.admin-service.url: admin service url to be accessed by apollo-portal
adminServiceUrlOverride: ""
# specify the context path, e.g. /apollo
contextPath: ""
# environment variables passed to the container, e.g. JAVA_OPTS
env: {}
strategy: {}
resources: {}
nodeSelector: {}
tolerations: []
affinity: {}
adminService:
name: apollo-adminservice
fullNameOverride: ""
replicaCount: 2
containerPort: 8090
image:
repository: apolloconfig/apollo-adminservice
tag: ""
pullPolicy: IfNotPresent
imagePullSecrets: []
service:
fullNameOverride: ""
port: 8090
targetPort: 8090
#此处要注意 需要设置外部连接时要设置为此类型
type: NodePort
ingress:
enabled: false
annotations: { }
hosts:
- host: ""
paths: [ ]
tls: [ ]
liveness:
initialDelaySeconds: 100
periodSeconds: 10
readiness:
initialDelaySeconds: 30
periodSeconds: 5
config:
# spring profiles to activate
profiles: "github,kubernetes"
# specify the context path, e.g. /apollo
contextPath: ""
# environment variables passed to the container, e.g. JAVA_OPTS
env: {}
strategy: {}
resources: {}
nodeSelector: {}
tolerations: []
affinity: {}
[ 创建及校验fat ]
【uat环境】
[ 配置uat环境values.yaml ] —— 除了数据库有变更之外,其它与fat差不多
configdb:
name: apollo-configdb
# apolloconfigdb host【数据库地址rds的type为ExternalName】
#此处要注意 rds 地址
host: rm-xxx.mysql.rds.aliyuncs.com
#此处要注意
port: 3306
#此处要注意 uat环境对应数据库名称
dbName: xxx
# apolloconfigdb user name
#此处要注意 账号
userName: xxx
# apolloconfigdb password
#此处要注意 密码
password: xxx
connectionStringProperties: characterEncoding=utf8
service:
# enabled 与 type
#此处要注意
enabled: true
fullNameOverride: ""
port: 3306
#此处要注意 如果你也是rds则要修改为如下,如果不是rds请看具体配置说明
type: ExternalName
configService:
name: apollo-configservice
fullNameOverride: ""
replicaCount: 2
containerPort: 8080
image:
repository: apolloconfig/apollo-configservice
tag: ""
pullPolicy: IfNotPresent
imagePullSecrets: []
service:
fullNameOverride: ""
port: 8080
targetPort: 8080
#此处要注意 需要设置外部连接时要设置为此类型
type: NodePort
ingress:
enabled: false
annotations: { }
hosts:
- host: ""
paths: [ ]
tls: [ ]
liveness:
initialDelaySeconds: 100
periodSeconds: 10
readiness:
initialDelaySeconds: 30
periodSeconds: 5
config:
# spring profiles to activate
profiles: "github,kubernetes"
# override apollo.config-service.url: config service url to be accessed by apollo-client
configServiceUrlOverride: ""
# override apollo.admin-service.url: admin service url to be accessed by apollo-portal
adminServiceUrlOverride: ""
# specify the context path, e.g. /apollo
contextPath: ""
# environment variables passed to the container, e.g. JAVA_OPTS
env: {}
strategy: {}
resources: {}
nodeSelector: {}
tolerations: []
affinity: {}
adminService:
name: apollo-adminservice
fullNameOverride: ""
replicaCount: 2
containerPort: 8090
image:
repository: apolloconfig/apollo-adminservice
tag: ""
pullPolicy: IfNotPresent
imagePullSecrets: []
service:
fullNameOverride: ""
port: 8090
targetPort: 8090
#此处要注意 需要设置外部连接时要设置为此类型
type: NodePort
ingress:
enabled: false
annotations: { }
hosts:
- host: ""
paths: [ ]
tls: [ ]
liveness:
initialDelaySeconds: 100
periodSeconds: 10
readiness:
initialDelaySeconds: 30
periodSeconds: 5
config:
# spring profiles to activate
profiles: "github,kubernetes"
# specify the context path, e.g. /apollo
contextPath: ""
# environment variables passed to the container, e.g. JAVA_OPTS
env: {}
strategy: {}
resources: {}
nodeSelector: {}
tolerations: []
affinity: {}
[ 创建及校验fat ]
【pro环境】
[ 配置uat环境values.yaml ] —— 数据库有变动及service type也可以有变动
configdb:
name: apollo-configdb
# apolloconfigdb host【数据库地址rds的type为ExternalName】
#此处要注意 rds 地址
host: rm-xxx.mysql.rds.aliyuncs.com
#此处要注意
port: 3306
#此处要注意 pro环境对应数据库名称
dbName: xxx
# apolloconfigdb user name
#此处要注意 账号
userName: xxx
# apolloconfigdb password
#此处要注意 密码
password: xxx
connectionStringProperties: characterEncoding=utf8
service:
# enabled 与 type
#此处要注意
enabled: true
fullNameOverride: ""
port: 3306
#此处要注意 如果你也是rds则要修改为如下,如果不是rds请看具体配置说明
type: ExternalName
configService:
name: apollo-configservice
fullNameOverride: ""
replicaCount: 2
containerPort: 8080
image:
repository: apolloconfig/apollo-configservice
tag: ""
pullPolicy: IfNotPresent
imagePullSecrets: []
service:
fullNameOverride: ""
port: 8080
targetPort: 8080
#理论上没有外部服务要调用此地址可以直接是ClusterIP类型,但是以防万一后期拓展,所以还是设置为NodePort
type: NodePort
ingress:
enabled: false
annotations: { }
hosts:
- host: ""
paths: [ ]
tls: [ ]
liveness:
initialDelaySeconds: 100
periodSeconds: 10
readiness:
initialDelaySeconds: 30
periodSeconds: 5
config:
# spring profiles to activate
profiles: "github,kubernetes"
# override apollo.config-service.url: config service url to be accessed by apollo-client
configServiceUrlOverride: ""
# override apollo.admin-service.url: admin service url to be accessed by apollo-portal
adminServiceUrlOverride: ""
# specify the context path, e.g. /apollo
contextPath: ""
# environment variables passed to the container, e.g. JAVA_OPTS
env: {}
strategy: {}
resources: {}
nodeSelector: {}
tolerations: []
affinity: {}
adminService:
name: apollo-adminservice
fullNameOverride: ""
replicaCount: 2
containerPort: 8090
image:
repository: apolloconfig/apollo-adminservice
tag: ""
pullPolicy: IfNotPresent
imagePullSecrets: []
service:
fullNameOverride: ""
port: 8090
targetPort: 8090
#理论上没有外部服务要调用此地址可以直接是ClusterIP类型,但是以防万一后期拓展,所以还是设置为NodePort
type: NodePort
ingress:
enabled: false
annotations: { }
hosts:
- host: ""
paths: [ ]
tls: [ ]
liveness:
initialDelaySeconds: 100
periodSeconds: 10
readiness:
initialDelaySeconds: 30
periodSeconds: 5
config:
# spring profiles to activate
profiles: "github,kubernetes"
# specify the context path, e.g. /apollo
contextPath: ""
# environment variables passed to the container, e.g. JAVA_OPTS
env: {}
strategy: {}
resources: {}
nodeSelector: {}
tolerations: []
affinity: {}
[ 创建及校验fat ]
四、配置安装apollo-portal
更多推荐
已为社区贡献1条内容
所有评论(0)