Last active
November 5, 2017 14:37
-
-
Save CaptTofu/f7d841bbe8494cc92c455953c96ea557 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl get ReplicaSet | |
NAME DESIRED CURRENT READY AGE | |
etcd-global 3 3 3 2m | |
etcd-zone1 3 3 3 2m | |
orchestrator-3609634489 1 1 1 2m | |
vtctld-3332466448 1 1 1 2m | |
vtgate-zone1-4079315694 3 3 3 2m | |
kubectl get pv | |
NAME CAPACITY ACCESSMODES RECLAIMPOLICY STATUS CLAIM STORAGECLASS REASON AGE | |
pvc-a6ff2e47-c233-11e7-8e25-42010a800002 1Gi RWO Delete Bound default/orchestrator-data standard 2m | |
pvc-a778aa5b-c233-11e7-8e25-42010a800002 10Gi RWO Delete Bound default/vtdataroot-zone1-main-80-x-replica-0 standard 2m | |
pvc-a7951705-c233-11e7-8e25-42010a800002 10Gi RWO Delete Bound default/vtdataroot-zone1-main-x-80-replica-0 standard 2m | |
kubectl get pvc | |
NAME STATUS VOLUME CAPACITY ACCESSMODES STORAGECLASS AGE | |
orchestrator-data Bound pvc-a6ff2e47-c233-11e7-8e25-42010a800002 1Gi RWO standard 2m | |
vtdataroot-zone1-main-80-x-replica-0 Bound pvc-a778aa5b-c233-11e7-8e25-42010a800002 10Gi RWO standard 2m | |
vtdataroot-zone1-main-x-80-replica-0 Bound pvc-a7951705-c233-11e7-8e25-42010a800002 10Gi RWO standard 2m | |
kubectl get statefulSets | |
NAME DESIRED CURRENT AGE | |
zone1-main-80-x-replica 2 1 2m | |
zone1-main-x-80-replica 2 1 2m | |
kubectl get pods | |
NAME READY STATUS RESTARTS AGE | |
etcd-global-ftzjj 1/1 Running 0 3m | |
etcd-global-rj9p5 1/1 Running 0 3m | |
etcd-global-s9725 1/1 Running 0 3m | |
etcd-zone1-88g1x 1/1 Running 0 3m | |
etcd-zone1-9vh16 1/1 Running 0 3m | |
etcd-zone1-br5q6 1/1 Running 0 3m | |
orchestrator-3609634489-zs3rd 2/2 Running 0 3m | |
vtctld-3332466448-dlhvx 1/1 Running 0 3m | |
vtgate-zone1-4079315694-1czrx 1/1 Running 0 3m | |
vtgate-zone1-4079315694-40ld6 1/1 Running 0 3m | |
vtgate-zone1-4079315694-bbtxr 1/1 Running 0 3m | |
zone1-main-80-x-replica-0 0/2 Pending 0 3m | |
zone1-main-x-80-replica-0 0/2 Pending 0 3m | |
kubectl get pods | |
NAME READY STATUS RESTARTS AGE | |
etcd-global-ftzjj 1/1 Running 0 3m | |
etcd-global-rj9p5 1/1 Running 0 3m | |
etcd-global-s9725 1/1 Running 0 3m | |
etcd-zone1-88g1x 1/1 Running 0 3m | |
etcd-zone1-9vh16 1/1 Running 0 3m | |
etcd-zone1-br5q6 1/1 Running 0 3m | |
orchestrator-3609634489-zs3rd 2/2 Running 0 3m | |
vtctld-3332466448-dlhvx 1/1 Running 0 3m | |
vtgate-zone1-4079315694-1czrx 1/1 Running 0 3m | |
vtgate-zone1-4079315694-40ld6 1/1 Running 0 3m | |
vtgate-zone1-4079315694-bbtxr 1/1 Running 0 3m | |
zone1-main-80-x-replica-0 0/2 Pending 0 3m | |
zone1-main-x-80-replica-0 0/2 Pending 0 3m | |
kubectl describe pod zone1-main-80-x-replica-0 | |
Name: zone1-main-80-x-replica-0 | |
Namespace: default | |
Node: <none> | |
Labels: app=vitess | |
cell=zone1 | |
component=vttablet | |
controller-revision-hash=zone1-main-80-x-replica-4127192539 | |
keyspace=main | |
shard=80-x | |
type=replica | |
Annotations: kubernetes.io/created-by={"kind":"SerializedReference","apiVersion":"v1","reference":{"kind":"StatefulSet","namespace":"default","name":"zone1-main-80-x-replica","uid":"a741390d-c233-11e7-8e25-42010a8... | |
kubernetes.io/limit-ranger=LimitRanger plugin set: cpu request for init container init-vtdataroot; cpu request for init container init-tablet-uid | |
pod.alpha.kubernetes.io/initialized=true | |
Status: Pending | |
IP: | |
Created By: StatefulSet/zone1-main-80-x-replica | |
Controlled By: StatefulSet/zone1-main-80-x-replica | |
Init Containers: | |
init-vtdataroot: | |
Image: vitess/lite:latest | |
Port: <none> | |
Command: | |
bash | |
-c | |
set -ex; mkdir -p $VTDATAROOT/tmp; chown vitess:vitess $VTDATAROOT $VTDATAROOT/tmp; | |
Requests: | |
cpu: 100m | |
Environment: <none> | |
Mounts: | |
/var/run/secrets/kubernetes.io/serviceaccount from default-token-md9hm (ro) | |
/vt/vtdataroot from vtdataroot (rw) | |
init-tablet-uid: | |
Image: vitess/lite:latest | |
Port: <none> | |
Command: | |
bash | |
-c | |
set -ex | |
# Split pod name (via hostname) into prefix and ordinal index. | |
hostname=$(hostname -s) | |
[[ $hostname =~ ^(.+)-([0-9]+)$ ]] || exit 1 | |
pod_prefix=${BASH_REMATCH[1]} | |
pod_index=${BASH_REMATCH[2]} | |
# Prepend cell name since tablet UIDs must be globally unique. | |
uid_name=zone1-$pod_prefix | |
# Take MD5 hash of cellname-podprefix. | |
uid_hash=$(echo -n $uid_name | md5sum | awk "{print \$1}") | |
# Take first 24 bits of hash, convert to decimal. | |
# Shift left 2 decimal digits, add in index. | |
tablet_uid=$((16#${uid_hash:0:6} * 100 + $pod_index)) | |
# Save UID for other containers to read. | |
mkdir -p $VTDATAROOT/init | |
echo $tablet_uid > $VTDATAROOT/init/tablet-uid | |
# Tell MySQL what hostname to report in SHOW SLAVE HOSTS. | |
# Orchestrator looks there, so it should match -tablet_hostname above. | |
echo report-host=$hostname.vttablet > $VTDATAROOT/init/report-host.cnf | |
Requests: | |
cpu: 100m | |
Environment: <none> | |
Mounts: | |
/var/run/secrets/kubernetes.io/serviceaccount from default-token-md9hm (ro) | |
/vt/vtdataroot from vtdataroot (rw) | |
Containers: | |
vttablet: | |
Image: vitess/lite:latest | |
Ports: 15002/TCP, 16002/TCP | |
Command: | |
bash | |
-c | |
set -ex | |
eval exec /vt/bin/vttablet $(cat <<END_OF_COMMAND | |
-topo_implementation "etcd" | |
-etcd_global_addrs "http://etcd-global:4001" | |
-log_dir "$VTDATAROOT/tmp" | |
-alsologtostderr | |
-port 15002 | |
-grpc_port 16002 | |
-service_map "grpc-queryservice,grpc-tabletmanager,grpc-updatestream" | |
-tablet-path "zone1-$(cat $VTDATAROOT/init/tablet-uid)" | |
-tablet_hostname "$(hostname).vttablet" | |
-init_keyspace "main" | |
-init_shard "80-" | |
-init_tablet_type "replica" | |
-health_check_interval "5s" | |
-mysqlctl_socket "$VTDATAROOT/mysqlctl.sock" | |
-db-config-app-uname "vt_app" | |
-db-config-app-dbname "vt_main" | |
-db-config-app-charset "utf8" | |
-db-config-dba-uname "vt_dba" | |
-db-config-dba-dbname "vt_main" | |
-db-config-dba-charset "utf8" | |
-db-config-repl-uname "vt_repl" | |
-db-config-repl-dbname "vt_main" | |
-db-config-repl-charset "utf8" | |
-db-config-filtered-uname "vt_filtered" | |
-db-config-filtered-dbname "vt_main" | |
-db-config-filtered-charset "utf8" | |
-enable_semi_sync | |
-enable_replication_reporter | |
-orc_api_url "http://orchestrator/api" | |
-orc_discover_interval "5m" | |
-restore_from_backup | |
-backup_storage_implementation="gcs" | |
-gcs_backup_storage_bucket="kubecon-2017-backups" | |
END_OF_COMMAND | |
) | |
Limits: | |
cpu: 500m | |
memory: 1Gi | |
Requests: | |
cpu: 500m | |
memory: 1Gi | |
Liveness: http-get http://:15002/debug/vars delay=60s timeout=10s period=10s #success=1 #failure=3 | |
Environment: <none> | |
Mounts: | |
/dev/log from syslog (rw) | |
/etc/ssl/certs/ca-certificates.crt from certs (ro) | |
/var/run/secrets/kubernetes.io/serviceaccount from default-token-md9hm (ro) | |
/vt/vtdataroot from vtdataroot (rw) | |
mysql: | |
Image: vitess/lite:latest | |
Port: <none> | |
Command: | |
bash | |
-c | |
set -ex | |
eval exec /vt/bin/mysqlctld $(cat <<END_OF_COMMAND | |
-log_dir "$VTDATAROOT/tmp" | |
-alsologtostderr | |
-tablet_uid "$(cat $VTDATAROOT/init/tablet-uid)" | |
-socket_file "$VTDATAROOT/mysqlctl.sock" | |
-db-config-dba-uname "vt_dba" | |
-db-config-dba-charset "utf8" | |
-init_db_sql_file "$VTROOT/config/init_db.sql" | |
END_OF_COMMAND | |
) | |
Limits: | |
cpu: 500m | |
memory: 1Gi | |
Requests: | |
cpu: 500m | |
memory: 1Gi | |
Environment: | |
EXTRA_MY_CNF: /vt/vtdataroot/init/report-host.cnf:/vt/config/mycnf/master_mysql56.cnf | |
Mounts: | |
/dev/log from syslog (rw) | |
/var/run/secrets/kubernetes.io/serviceaccount from default-token-md9hm (ro) | |
/vt/vtdataroot from vtdataroot (rw) | |
Conditions: | |
Type Status | |
PodScheduled False | |
Volumes: | |
vtdataroot: | |
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace) | |
ClaimName: vtdataroot-zone1-main-80-x-replica-0 | |
ReadOnly: false | |
syslog: | |
Type: HostPath (bare host directory volume) | |
Path: /dev/log | |
certs: | |
Type: HostPath (bare host directory volume) | |
Path: /etc/ssl/certs/ca-certificates.crt | |
default-token-md9hm: | |
Type: Secret (a volume populated by a Secret) | |
SecretName: default-token-md9hm | |
Optional: false | |
QoS Class: Guaranteed | |
Node-Selectors: <none> | |
Tolerations: node.alpha.kubernetes.io/notReady:NoExecute for 300s | |
node.alpha.kubernetes.io/unreachable:NoExecute for 300s | |
Events: | |
FirstSeen LastSeen Count From SubObjectPath Type Reason Message | |
--------- -------- ----- ---- ------------- -------- ------ ------- | |
4m 4m 4 default-scheduler Warning FailedScheduling PersistentVolumeClaim is not bound: "vtdataroot-zone1-main-80-x-replica-0" (repeated 3 times) | |
4m <invalid> 18 default-scheduler Warning FailedScheduling No nodes are available that match all of the following predicates:: Insufficient cpu (3). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment