Kubernetes 为什么豆荚留在';待定';地位
我很困惑为什么我的吊舱处于等待状态Kubernetes 为什么豆荚留在';待定';地位,kubernetes,vitess,Kubernetes,Vitess,我很困惑为什么我的吊舱处于等待状态 NAMESPACE NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE default etcd-global-5zh4k77slf 1/1 Running 0 46m 192.
NAMESPACE NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE
default etcd-global-5zh4k77slf 1/1 Running 0 46m 192.168.2.3 t-searchredis-a2 <none>
default etcd-global-f7db9nnfq9 1/1 Running 0 45m 192.168.2.5 t-searchredis-a2 <none>
default etcd-global-ksh5r9k45l 1/1 Running 0 45m 192.168.1.4 t-searchredis-a1 <none>
default etcd-operator-6f44498865-t84l5 1/1 Running 0 50m 192.168.2.2 t-searchredis-a2 <none>
default etcd-test-5g5lmcrl2x 1/1 Running 0 46m 192.168.2.4 t-searchredis-a2 <none>
default etcd-test-g4xrkk7wgg 1/1 Running 0 45m 192.168.1.5 t-searchredis-a1 <none>
default etcd-test-jkq4rjrwm8 1/1 Running 0 45m 192.168.2.6 t-searchredis-a2 <none>
default vtctld-z5d46 1/1 Running 0 44m 192.168.1.6 t-searchredis-a1 <none>
default vttablet-100 0/2 Pending 0 40m <none> <none> <none>
default vttablet-101 0/2 Pending 0 40m <none> <none> <none>
default vttablet-102 0/2 Pending 0 40m <none> <none> <none>
default vttablet-103 0/2 Pending 0 40m <none> <none> <none>
default vttablet-104 0/2 Pending 0 40m <none> <none> <none>
apiVersion: v1
kind: Pod
metadata:
creationTimestamp: 2018-11-27T07:25:19Z
labels:
app: vitess
component: vttablet
keyspace: test_keyspace
shard: "0"
tablet: test-0000000100
name: vttablet-100
namespace: default
resourceVersion: "22304"
selfLink: /api/v1/namespaces/default/pods/vttablet-100
uid: 98258046-f215-11e8-b6a1-fa163e0411d1
spec:
containers:
- command:
- bash
- -c
- |-
set -e
mkdir -p $VTDATAROOT/tmp
chown -R vitess /vt
su -p -s /bin/bash -c "/vt/bin/vttablet -binlog_use_v3_resharding_mode -topo_implementation etcd2 -topo_global_server_address http://etcd-global-client:2379 -topo_global_root /global -log_dir $VTDATAROOT/tmp -alsologtostderr -port 15002 -grpc_port 16002 -service_map 'grpc-queryservice,grpc-tabletmanager,grpc-updatestream' -tablet-path test-0000000100 -tablet_hostname $(hostname -i) -init_keyspace test_keyspace -init_shard 0 -init_tablet_type replica -health_check_interval 5s -mysqlctl_socket $VTDATAROOT/mysqlctl.sock -enable_semi_sync -enable_replication_reporter -orc_api_url http://orchestrator/api -orc_discover_interval 5m -restore_from_backup -backup_storage_implementation file -file_backup_storage_root '/usr/local/MySQL_DB_Backup/test'" vitess
env:
- name: EXTRA_MY_CNF
value: /vt/config/mycnf/master_mysql56.cnf
image: vitess/lite
imagePullPolicy: Always
livenessProbe:
failureThreshold: 3
httpGet:
path: /debug/vars
port: 15002
scheme: HTTP
initialDelaySeconds: 60
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 10
name: vttablet
ports:
- containerPort: 15002
name: web
protocol: TCP
- containerPort: 16002
name: grpc
protocol: TCP
resources:
limits:
cpu: 500m
memory: 1Gi
requests:
cpu: 500m
memory: 1Gi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /dev/log
name: syslog
- mountPath: /vt/vtdataroot
name: vtdataroot
- mountPath: /etc/ssl/certs/ca-certificates.crt
name: certs
readOnly: true
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
name: default-token-7g2jb
readOnly: true
- command:
- sh
- -c
- |-
mkdir -p $VTDATAROOT/tmp && chown -R vitess /vt
su -p -c "/vt/bin/mysqlctld -log_dir $VTDATAROOT/tmp -alsologtostderr -tablet_uid 100 -socket_file $VTDATAROOT/mysqlctl.sock -init_db_sql_file $VTROOT/config/init_db.sql" vitess
env:
- name: EXTRA_MY_CNF
value: /vt/config/mycnf/master_mysql56.cnf
image: vitess/lite
imagePullPolicy: Always
name: mysql
resources:
limits:
cpu: 500m
memory: 1Gi
requests:
cpu: 500m
memory: 1Gi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /dev/log
name: syslog
- mountPath: /vt/vtdataroot
name: vtdataroot
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
name: default-token-7g2jb
readOnly: true
dnsPolicy: ClusterFirst
priority: 0
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
serviceAccount: default
serviceAccountName: default
terminationGracePeriodSeconds: 30
tolerations:
- effect: NoExecute
key: node.kubernetes.io/not-ready
operator: Exists
tolerationSeconds: 300
- effect: NoExecute
key: node.kubernetes.io/unreachable
operator: Exists
tolerationSeconds: 300
volumes:
- hostPath:
path: /dev/log
type: ""
name: syslog
- emptyDir: {}
name: vtdataroot
- hostPath:
path: /etc/ssl/certs/ca-certificates.crt
type: ""
name: certs
- name: default-token-7g2jb
secret:
defaultMode: 420
secretName: default-token-7g2jb
status:
conditions:
- lastProbeTime: null
lastTransitionTime: 2018-11-27T07:25:19Z
message: '0/3 nodes are available: 1 node(s) had taints that the pod didn''t tolerate,
2 Insufficient cpu.'
reason: Unschedulable
status: "False"
type: PodScheduled
phase: Pending
qosClass: Guaranteed
Vitess似乎无法在节点上调度vttablet pod。我构建了一个2工作节点的Kubernetes集群(节点a和B),并在集群上启动了VTTablet,但只有两个VTTablet正常启动,另外三个处于挂起状态
当我允许主节点调度POD时,三个挂起的vttablet都在主节点上启动(第一个错误,然后正常运行),并且我创建了表,两个vttablet无法执行
当我将两个新节点(节点C和D)添加到kubernetes集群中,拆除vitess并重新启动vttablet时,我发现三个vttablet吊舱仍然处于挂起状态
状态,并且如果我启动节点A或节点B,我将丢失vttablet
,并且它将不会在新节点上重新启动。我拆掉了vitess,也拆掉了k8s集群,重建它,这次我使用节点C&D构建了一个2个工作节点的k8s集群,所有vttablet现在都保持挂起状态
NAMESPACE NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE
default etcd-global-5zh4k77slf 1/1 Running 0 46m 192.168.2.3 t-searchredis-a2 <none>
default etcd-global-f7db9nnfq9 1/1 Running 0 45m 192.168.2.5 t-searchredis-a2 <none>
default etcd-global-ksh5r9k45l 1/1 Running 0 45m 192.168.1.4 t-searchredis-a1 <none>
default etcd-operator-6f44498865-t84l5 1/1 Running 0 50m 192.168.2.2 t-searchredis-a2 <none>
default etcd-test-5g5lmcrl2x 1/1 Running 0 46m 192.168.2.4 t-searchredis-a2 <none>
default etcd-test-g4xrkk7wgg 1/1 Running 0 45m 192.168.1.5 t-searchredis-a1 <none>
default etcd-test-jkq4rjrwm8 1/1 Running 0 45m 192.168.2.6 t-searchredis-a2 <none>
default vtctld-z5d46 1/1 Running 0 44m 192.168.1.6 t-searchredis-a1 <none>
default vttablet-100 0/2 Pending 0 40m <none> <none> <none>
default vttablet-101 0/2 Pending 0 40m <none> <none> <none>
default vttablet-102 0/2 Pending 0 40m <none> <none> <none>
default vttablet-103 0/2 Pending 0 40m <none> <none> <none>
default vttablet-104 0/2 Pending 0 40m <none> <none> <none>
apiVersion: v1
kind: Pod
metadata:
creationTimestamp: 2018-11-27T07:25:19Z
labels:
app: vitess
component: vttablet
keyspace: test_keyspace
shard: "0"
tablet: test-0000000100
name: vttablet-100
namespace: default
resourceVersion: "22304"
selfLink: /api/v1/namespaces/default/pods/vttablet-100
uid: 98258046-f215-11e8-b6a1-fa163e0411d1
spec:
containers:
- command:
- bash
- -c
- |-
set -e
mkdir -p $VTDATAROOT/tmp
chown -R vitess /vt
su -p -s /bin/bash -c "/vt/bin/vttablet -binlog_use_v3_resharding_mode -topo_implementation etcd2 -topo_global_server_address http://etcd-global-client:2379 -topo_global_root /global -log_dir $VTDATAROOT/tmp -alsologtostderr -port 15002 -grpc_port 16002 -service_map 'grpc-queryservice,grpc-tabletmanager,grpc-updatestream' -tablet-path test-0000000100 -tablet_hostname $(hostname -i) -init_keyspace test_keyspace -init_shard 0 -init_tablet_type replica -health_check_interval 5s -mysqlctl_socket $VTDATAROOT/mysqlctl.sock -enable_semi_sync -enable_replication_reporter -orc_api_url http://orchestrator/api -orc_discover_interval 5m -restore_from_backup -backup_storage_implementation file -file_backup_storage_root '/usr/local/MySQL_DB_Backup/test'" vitess
env:
- name: EXTRA_MY_CNF
value: /vt/config/mycnf/master_mysql56.cnf
image: vitess/lite
imagePullPolicy: Always
livenessProbe:
failureThreshold: 3
httpGet:
path: /debug/vars
port: 15002
scheme: HTTP
initialDelaySeconds: 60
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 10
name: vttablet
ports:
- containerPort: 15002
name: web
protocol: TCP
- containerPort: 16002
name: grpc
protocol: TCP
resources:
limits:
cpu: 500m
memory: 1Gi
requests:
cpu: 500m
memory: 1Gi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /dev/log
name: syslog
- mountPath: /vt/vtdataroot
name: vtdataroot
- mountPath: /etc/ssl/certs/ca-certificates.crt
name: certs
readOnly: true
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
name: default-token-7g2jb
readOnly: true
- command:
- sh
- -c
- |-
mkdir -p $VTDATAROOT/tmp && chown -R vitess /vt
su -p -c "/vt/bin/mysqlctld -log_dir $VTDATAROOT/tmp -alsologtostderr -tablet_uid 100 -socket_file $VTDATAROOT/mysqlctl.sock -init_db_sql_file $VTROOT/config/init_db.sql" vitess
env:
- name: EXTRA_MY_CNF
value: /vt/config/mycnf/master_mysql56.cnf
image: vitess/lite
imagePullPolicy: Always
name: mysql
resources:
limits:
cpu: 500m
memory: 1Gi
requests:
cpu: 500m
memory: 1Gi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /dev/log
name: syslog
- mountPath: /vt/vtdataroot
name: vtdataroot
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
name: default-token-7g2jb
readOnly: true
dnsPolicy: ClusterFirst
priority: 0
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
serviceAccount: default
serviceAccountName: default
terminationGracePeriodSeconds: 30
tolerations:
- effect: NoExecute
key: node.kubernetes.io/not-ready
operator: Exists
tolerationSeconds: 300
- effect: NoExecute
key: node.kubernetes.io/unreachable
operator: Exists
tolerationSeconds: 300
volumes:
- hostPath:
path: /dev/log
type: ""
name: syslog
- emptyDir: {}
name: vtdataroot
- hostPath:
path: /etc/ssl/certs/ca-certificates.crt
type: ""
name: certs
- name: default-token-7g2jb
secret:
defaultMode: 420
secretName: default-token-7g2jb
status:
conditions:
- lastProbeTime: null
lastTransitionTime: 2018-11-27T07:25:19Z
message: '0/3 nodes are available: 1 node(s) had taints that the pod didn''t tolerate,
2 Insufficient cpu.'
reason: Unschedulable
status: "False"
type: PodScheduled
phase: Pending
qosClass: Guaranteed
名称空间名称就绪状态重新启动IP节点指定节点
默认etcd-global-5zh4k77slf 1/1运行0 46m 192.168.2.3 t-searchredis-a2
默认etcd-global-f7db9nnfq9 1/1运行0 45m 192.168.2.5 t-searchredis-a2
默认etcd-global-ksh5r9k45l 1/1运行0 45m 192.168.1.4 t-searchredis-a1
默认etcd-operator-6F4498865-t84l5 1/1运行0.50m 192.168.2.2 t-searchredis-a2
默认etcd-test-5g5lmcrl2x 1/1运行0 46m 192.168.2.4 t-searchredis-a2
默认etcd-test-g4xrkk7wgg 1/1运行0 45m 192.168.1.5 t-searchredis-a1
默认etcd-test-jkq4rjrwm8 1/1运行0 45m 192.168.2.6 t-searchredis-a2
默认vtctld-z5d46 1/1运行0 44m 192.168.1.6 t-searchredis-a1
默认vttablet-100 0/2挂起0 40m
默认vttablet-101 0/2挂起0 40m
默认vttablet-102 0/2挂起0 40m
默认vttablet-103 0/2挂起0 40m
默认vttablet-104 0/2挂起0 40m
版本:v1
种类:豆荚
元数据:
creationTimestamp:2018-11-27T07:25:19Z
标签:
app:vitess
组件:VT平板电脑
keyspace:test_keyspace
碎片:“0”
平板电脑:测试-0000000 100
姓名:VT-100
名称空间:默认值
资源版本:“22304”
selfLink:/api/v1/namespace/default/pods/vttablet-100
uid:98258046-f215-11e8-b6a1-fa163e0411d1
规格:
容器:
-命令:
-猛击
--c
- |-
set-e
mkdir-p$VTDATAROOT/tmp
周-维蒂斯/悉尼威立雅运输公司
su-p-s/bin/bash-c“/vt/bin/vttablet-binlog\u use\u v3\u resharding\u mode-topo\u implementation etcd2-topo\u global\u server\u address”http://etcd-global-client:2379 -topo_global_root/global-log_dir$VTDATAROOT/tmp-alsologtosterr-端口15002-grpc_端口16002-服务地图'grpc queryservice,grpc tabletmanager,grpc updatestream'-平板电脑路径测试-0000000 100-平板电脑主机名$(主机名-i)-init_keyspace test_keyspace-init_shard 0-init_tablet_type replica-health_check_interval 5s-mysqlctl_socket$VTDATAROOT/mysqlctl.sock-enable_semi_sync-enable_reporter-orc_api_urlhttp://orchestrator/api -orc\u discover\u interval 5m-从\u备份中恢复\u-备份\u存储\u实现文件-文件\u备份\u存储\u root'/usr/local/MySQL_DB_备份/测试“vitess”
环境:
-姓名:EXTRA_MY_CNF
值:/vt/config/mycnf/master_mysql56.cnf
图片:vitess/lite
imagePullPolicy:始终
livenessProbe:
故障保持:3
httpGet:
路径:/debug/vars
港口:15002
方案:HTTP
初始延迟秒数:60
秒:10
成功阈值:1
timeoutSeconds:10
姓名:VTG
端口:
-集装箱港口:15002
名称:网站
协议:TCP
-集装箱港口:16002
姓名:grpc
协议:TCP
资源:
限制:
cpu:500米
内存:1Gi
请求:
cpu:500米
内存:1Gi
terminationMessagePath:/dev/终止日志
terminationMessagePolicy:文件
体积数量:
-装载路径:/dev/log
名称:syslog
-装载路径:/vt/vtdataroot
名称:vtdataroot
-挂载路径:/etc/ssl/certs/ca-certificates.crt
名称:certs
只读:正确
-挂载路径:/var/run/secrets/kubernetes.io/serviceCount
名称:default-token-7g2jb
只读:正确
-命令:
-嘘
--c
- |-
mkdir-p$VTDATAROOT/tmp&chown-R vites/vt
su-p-c“/vt/bin/mysqlctld-log_dir$VTDATAROOT/tmp-alsologtostderr-tabletuid 100-socket_文件$VTDATAROOT/mysqlctl.sock-init_db_sql_文件$VTROOT/config/init_db.sql”viess
环境:
-姓名:EXTRA_MY_CNF
值:/vt/config/mycnf/master_mysql56.cnf
图片:vitess/lite
imagePullPolicy:始终
名称:mysql
资源:
限制:
cpu:500米
内存:1Gi
请求:
cpu:500米
内存:1Gi
terminationMessagePath:/dev/终止日志
terminationMessagePolicy:文件
体积数量:
-装载路径:/dev/log
名称:syslog
-装载路径:/vt/vtdataroot
名称:vtdataroot
-挂载路径:/var/run/secrets/kubernetes.io/serviceCount
名称:default-token-7g2jb
只读:正确
DNS政策:集群优先
优先级:0
restartPolicy:始终
调度程序