From 008317e3f24231324914cfe89054f4a2b5dc2a1d Mon Sep 17 00:00:00 2001 From: kairen Date: Thu, 14 Sep 2017 14:37:48 +0800 Subject: [PATCH] Fix pod probes yaml file --- .../configure-liveness-readiness-probes.md | 2 +- docs/tasks/configure-pod-container/exec-liveness.yaml | 7 +------ docs/tasks/configure-pod-container/http-liveness.yaml | 6 +----- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/docs/tasks/configure-pod-container/configure-liveness-readiness-probes.md b/docs/tasks/configure-pod-container/configure-liveness-readiness-probes.md index 9ae8da1f1e670..d28c89283e117 100644 --- a/docs/tasks/configure-pod-container/configure-liveness-readiness-probes.md +++ b/docs/tasks/configure-pod-container/configure-liveness-readiness-probes.md @@ -65,7 +65,7 @@ kubectl create -f https://k8s.io/docs/tasks/configure-pod-container/exec-livenes Within 30 seconds, view the Pod events: -``` +```shell kubectl describe pod liveness-exec ``` diff --git a/docs/tasks/configure-pod-container/exec-liveness.yaml b/docs/tasks/configure-pod-container/exec-liveness.yaml index 7b04a5eb8d91f..6978ca00698ae 100644 --- a/docs/tasks/configure-pod-container/exec-liveness.yaml +++ b/docs/tasks/configure-pod-container/exec-liveness.yaml @@ -1,22 +1,17 @@ apiVersion: v1 kind: Pod - metadata: labels: test: liveness name: liveness-exec spec: containers: - - name: liveness - + image: gcr.io/google_containers/busybox args: - /bin/sh - -c - touch /tmp/healthy; sleep 30; rm -rf /tmp/healthy; sleep 600 - - image: gcr.io/google_containers/busybox - livenessProbe: exec: command: diff --git a/docs/tasks/configure-pod-container/http-liveness.yaml b/docs/tasks/configure-pod-container/http-liveness.yaml index 8485e3444e01d..c1be66c5ba93a 100644 --- a/docs/tasks/configure-pod-container/http-liveness.yaml +++ b/docs/tasks/configure-pod-container/http-liveness.yaml @@ -6,14 +6,10 @@ metadata: name: liveness-http spec: containers: - - name: liveness - + image: gcr.io/google_containers/liveness args: - /server - - image: gcr.io/google_containers/liveness - livenessProbe: httpGet: path: /healthz