diff --git a/content/zh/examples/application/deployment-scale.yaml b/content/zh/examples/application/deployment-scale.yaml index 3bdc7b6f5b..68801c971d 100644 --- a/content/zh/examples/application/deployment-scale.yaml +++ b/content/zh/examples/application/deployment-scale.yaml @@ -14,6 +14,6 @@ spec: spec: containers: - name: nginx - image: nginx:1.8 + image: nginx:1.14.2 ports: - containerPort: 80 diff --git a/content/zh/examples/application/deployment-update.yaml b/content/zh/examples/application/deployment-update.yaml index 8c683d6dc7..18e8be65fb 100644 --- a/content/zh/examples/application/deployment-update.yaml +++ b/content/zh/examples/application/deployment-update.yaml @@ -14,6 +14,6 @@ spec: spec: containers: - name: nginx - image: nginx:1.8 # Update the version of nginx from 1.7.9 to 1.8 + image: nginx:1.16.1 # Update the version of nginx from 1.14.2 to 1.16.1 ports: - containerPort: 80 diff --git a/content/zh/examples/application/deployment.yaml b/content/zh/examples/application/deployment.yaml index 0f526b16c0..2cd599218d 100644 --- a/content/zh/examples/application/deployment.yaml +++ b/content/zh/examples/application/deployment.yaml @@ -14,6 +14,6 @@ spec: spec: containers: - name: nginx - image: nginx:1.7.9 + image: nginx:1.14.2 ports: - containerPort: 80 diff --git a/content/zh/examples/application/guestbook/redis-slave-deployment.yaml b/content/zh/examples/application/guestbook/redis-slave-deployment.yaml index ec4e48bc21..7dcfb6c263 100644 --- a/content/zh/examples/application/guestbook/redis-slave-deployment.yaml +++ b/content/zh/examples/application/guestbook/redis-slave-deployment.yaml @@ -20,7 +20,7 @@ spec: spec: containers: - name: slave - image: gcr.io/google_samples/gb-redisslave:v1 + image: gcr.io/google_samples/gb-redisslave:v3 resources: requests: cpu: 100m diff --git a/content/zh/examples/application/mysql/mysql-pv.yaml b/content/zh/examples/application/mysql/mysql-pv.yaml index 6f4e692f3b..c89779a83f 100644 --- a/content/zh/examples/application/mysql/mysql-pv.yaml +++ b/content/zh/examples/application/mysql/mysql-pv.yaml @@ -1,5 +1,5 @@ -kind: PersistentVolume apiVersion: v1 +kind: PersistentVolume metadata: name: mysql-pv-volume labels: diff --git a/content/zh/examples/application/mysql/mysql-statefulset.yaml b/content/zh/examples/application/mysql/mysql-statefulset.yaml index e0c04007a8..b69af02c59 100644 --- a/content/zh/examples/application/mysql/mysql-statefulset.yaml +++ b/content/zh/examples/application/mysql/mysql-statefulset.yaml @@ -106,16 +106,16 @@ spec: cd /var/lib/mysql # Determine binlog position of cloned data, if any. - if [[ -f xtrabackup_slave_info ]]; then + if [[ -f xtrabackup_slave_info && "x$( change_master_to.sql.in # Ignore xtrabackup_binlog_info in this case (it's useless). - rm -f xtrabackup_binlog_info + rm -f xtrabackup_slave_info xtrabackup_binlog_info elif [[ -f xtrabackup_binlog_info ]]; then # We're cloning directly from master. Parse binlog position. [[ `cat xtrabackup_binlog_info` =~ ^(.*?)[[:space:]]+(.*?)$ ]] || exit 1 - rm xtrabackup_binlog_info + rm -f xtrabackup_binlog_info xtrabackup_slave_info echo "CHANGE MASTER TO MASTER_LOG_FILE='${BASH_REMATCH[1]}',\ MASTER_LOG_POS=${BASH_REMATCH[2]}" > change_master_to.sql.in fi @@ -126,16 +126,15 @@ spec: until mysql -h 127.0.0.1 -e "SELECT 1"; do sleep 1; done echo "Initializing replication from clone position" + mysql -h 127.0.0.1 \ + -e "$(