我有谷歌云容器引擎设置。我想用外部卷旋转 mysql 的 pod。
复制控制器:
apiVersion: v1
kind: ReplicationController
metadata:
labels:
name: mysql
name: mysql-controller
spec:
replicas: 1
template:
metadata:
labels:
name: mysql
spec:
containers:
- image: mysql
name: mysql
ports:
- name: mysql
containerPort: 3306
hostPort: 3306
volumeMounts:
- name: mysql-persistent-storage
mountPath: /var/lib/mysql
volumes:
- name: mysql-persistent-storage
gcePersistentDisk:
pdName: mysql-1-disk
fsType: ext4
当我运行 RCwithout
外部卷时,MySQL 工作正常。当我尝试附加音量时,它会因以下错误而中断
Kubernetes POD 错误:
Warning FailedSyncError syncing pod, skipping: failed to "StartContainer" for "mysql" with CrashLoopBackOff: "Back-off 20s restarting failed container=mysql pod=mysql-controller-4hhqs_default(eb34ff46-8784-11e6-8f12-42010af00162)"
Disk (External Volume):
mysql-1-disk
是谷歌云盘。我尝试使用blank disk
和创建磁盘image - ubuntu
。两者都因相同的错误而失败。