[英]Spin a local database with Kubernetes and Rancher
How do you change the cockroachdb YAML configuration from Rancher catalog that it will just您如何更改 Rancher 目录中的 cockroachdb YAML 配置,它只会
Here's the complete YAML这是完整的 YAML
clusterDomain: cluster.local
conf:
attrs: []
cache: 25%
cluster-name: ''
disable-cluster-name-verification: false
http-port: 8080
join: []
locality: ''
logtostderr: INFO
max-disk-temp-storage: 0
max-offset: 500ms
max-sql-memory: 25%
port: 26257
single-node: false
sql-audit-dir: ''
image:
credentials: {}
pullPolicy: IfNotPresent
repository: cockroachdb/cockroach
tag: v20.1.3
ingress:
annotations: {}
enabled: false
hosts: []
labels: {}
paths:
- /
tls: []
init:
affinity: {}
annotations: {}
labels:
app.kubernetes.io/component: init
nodeSelector: {}
resources: {}
tolerations: []
labels: {}
networkPolicy:
enabled: false
ingress:
grpc: []
http: []
service:
discovery:
annotations: {}
labels:
app.kubernetes.io/component: cockroachdb
ports:
grpc:
external:
name: grpc
port: 26257
internal:
name: grpc-internal
port: 26257
http:
name: http
port: 8080
public:
annotations: {}
labels:
app.kubernetes.io/component: cockroachdb
type: ClusterIP
statefulset:
annotations: {}
args: []
budget:
maxUnavailable: 1
env: []
labels:
app.kubernetes.io/component: cockroachdb
nodeAffinity: {}
nodeSelector: {}
podAffinity: {}
podAntiAffinity:
type: soft
weight: 100
podManagementPolicy: Parallel
priorityClassName: ''
replicas: 3
resources: {}
secretMounts: []
tolerations: []
updateStrategy:
type: RollingUpdate
storage:
hostPath: ''
persistentVolume:
annotations: {}
enabled: true
labels: {}
size: 100Gi
storageClass: ''
tls:
certs:
clientRootSecret: cockroachdb-root
nodeSecret: cockroachdb-node
provided: false
tlsSecret: false
enabled: false
init:
image:
credentials: {}
pullPolicy: IfNotPresent
repository: cockroachdb/cockroach-k8s-request-cert
tag: '0.4'
serviceAccount:
create: true
name: ''
Storage: 100Gi
It looks like Storage
and store.persistentVolume.size
can both be set to 1Gi
if you are looking for one gigabyte of storage.如果您正在寻找 1 GB 的存储空间,看起来
Storage
和store.persistentVolume.size
都可以设置为1Gi
。
Then, I would check if you have a storageClass by running kubectl get storageClass
.然后,我会通过运行
kubectl get storageClass
检查您是否有 storageClass。 Many times, cluters come with the local-path-provisioner storageClass.很多时候,clusters 都伴随着local-path-provisioner storageClass。 If you have that, I would try setting
store.persistentVolume.storageClass
to the name of the local path proversion storageClass you have installed on your system.如果你有,我会尝试将
store.persistentVolume.storageClass
设置为你在系统上安装的本地路径保护 storageClass 的名称。 If you don't have that or an alternative, I would consider installing it.如果您没有那个或替代方案,我会考虑安装它。
I'm not certain, but it's possible that it is using this helm chart to install the database.我不确定,但它可能正在使用这个掌舵图来安装数据库。 This section of the chart deals with the volume claim managment, so I would look here if you need to do more troubleshooting: https://github.com/cockroachdb/helm-charts/blob/master/cockroachdb/templates/statefulset.yaml#L376
图表的这一部分处理卷声明管理,因此如果您需要进行更多故障排除,我会在这里查看: https://github.com/cockroachdb/helm-charts/blob/master/cockroachdb/templates/statefulset.yaml #L376
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.