我想在Kubernetes上为Prem上的SQL 2019 Big Data设置简单的持久性存储。但是不断抛出“ pod具有未绑定的立即PersistentVolumeClaims”事件。
当我部署映像时,pod mssql-controller会显示一个事件:
Name: mssql-controller-6vd8b
Namespace: sql2019
Priority: 0
PriorityClassName: <none>
Node: <none>
Labels: MSSQL_CLUSTER=sql2019
app=mssql-controller
Annotations: <none>
Status: Pending
IP:
Controlled By: ReplicaSet/mssql-controller
Containers:
mssql-controller:
Image: private-repo.microsoft.com/mssql-private-preview/mssql-controller:latest
Port: 8081/TCP
Host Port: 0/TCP
Environment:
ACCEPT_EULA: Y
CONTROLLER_ENABLE_TDS_PROXY: false
KUBERNETES_NAMESPACE: sql2019 (v1:metadata.namespace)
Mounts:
/root/secrets/controller-db from controller-db-secret (ro)
/root/secrets/controller-login from controller-login-secret (ro)
/root/secrets/knox from controller-knox-secret (ro)
/root/secrets/node-admin-login from node-admin-login-secret (ro)
/var/opt from controller-storage (rw)
/var/opt/controller/config from controller-config-volume (rw)
/var/run/secrets/kubernetes.io/serviceaccount from sa-mssql-controller-token-4fsbc (ro)
mssql-portal:
Image: private-repo.microsoft.com/mssql-private-preview/mssql-portal:latest
Port: 6001/TCP
Host Port: 0/TCP
Environment: <none>
Mounts:
/var/opt from controller-storage (rw)
/var/run/secrets/kubernetes.io/serviceaccount from sa-mssql-controller-token-4fsbc (ro)
mssql-server-controller:
Image: private-repo.microsoft.com/mssql-private-preview/mssql-server-controller:latest
Port: 1433/TCP
Host Port: 0/TCP
Environment:
ACCEPT_EULA: Y
SA_PASSWORD: <password removed>
Mounts:
/var/opt from controller-storage (rw)
/var/run/secrets/kubernetes.io/serviceaccount from sa-mssql-controller-token-4fsbc (ro)
mssql-monitor-fluentbit:
Image: private-repo.microsoft.com/mssql-private-preview/mssql-monitor-fluentbit:latest
Port: 2020/TCP
Host Port: 0/TCP
Limits:
memory: 100Mi
Requests:
cpu: 100m
memory: 100Mi
Environment:
FLUENT_ELASTICSEARCH_HOST: service-monitor-elasticsearch
FLUENT_ELASTICSEARCH_PORT: 9200
FLUENTBIT_CONFIG: fluentbit-controller.conf
KUBERNETES_NAMESPACE: sql2019 (v1:metadata.namespace)
KUBERNETES_NODE_NAME: (v1:spec.nodeName)
KUBERNETES_POD_NAME: mssql-controller-6vd8b (v1:metadata.name)
Mounts:
/var/opt from controller-storage (rw)
/var/run/secrets/kubernetes.io/serviceaccount from sa-mssql-controller-token-4fsbc (ro)
Conditions:
Type Status
PodScheduled False
Volumes:
controller-storage:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: mssql-controller-pvc
ReadOnly: false
controller-login-secret:
Type: Secret (a volume populated by a Secret)
SecretName: controller-login-secret
Optional: false
controller-db-secret:
Type: Secret (a volume populated by a Secret)
SecretName: controller-db-secret
Optional: false
controller-knox-secret:
Type: Secret (a volume populated by a Secret)
SecretName: controller-knox-secret
Optional: false
node-admin-login-secret:
Type: Secret (a volume populated by a Secret)
SecretName: node-admin-login-secret
Optional: false
controller-config-volume:
Type: ConfigMap (a volume populated by a ConfigMap)
Name: mssql-controller-config
Optional: false
sa-mssql-controller-token-4fsbc:
Type: Secret (a volume populated by a Secret)
SecretName: sa-mssql-controller-token-4fsbc
Optional: false
QoS Class: Burstable
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute for 300s
node.kubernetes.io/unreachable:NoExecute for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedScheduling 1s (x6 over 4s) default-scheduler pod has unbound immediate PersistentVolumeClaims
集群配置:
export USE_PERSISTENT_VOLUME=true
export STORAGE_CLASS_NAME=slow
StorageClass.yaml
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: slow
annotations:
storageclass.kubernetes.io/is-default-class: "true"
provisioner: kubernetes.io/gce-pd
parameters:
type: pd-standard
replication-type: none
我对Kubernetes还是很陌生,但这是我所知道的:
答案 0 :(得分:0)
就我而言,它是在使用minikube时发生的。我相信它甚至可能在任何云提供商上发生。
这样做的原因是因为一个或多个PVC的存储规范可能会请求更多的磁盘空间。
检查您的
...
resources:
requests:
storage: <value must be <= than available space>
我希望这对某人有帮助。