From 8ea9e448ac174a61b9742c7a14679ad67dd64b5f Mon Sep 17 00:00:00 2001 From: Tigran Tch <3153333+NargiT@users.noreply.github.com> Date: Wed, 4 Sep 2019 21:48:05 +0200 Subject: [PATCH] no need to expose port for probes I was doing the exerice and there is no need to expose the container port on kubernetes v1.15.1 --- e.observability.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/e.observability.md b/e.observability.md index 9abdd3b5..d294b58a 100644 --- a/e.observability.md +++ b/e.observability.md @@ -96,7 +96,7 @@ kubectl delete -f pod.yaml

```bash -kubectl run nginx --image=nginx --dry-run -o yaml --restart=Never --port=80 > pod.yaml +kubectl run nginx --image=nginx --dry-run -o yaml --restart=Never > pod.yaml vi pod.yaml ``` @@ -114,8 +114,6 @@ spec: imagePullPolicy: IfNotPresent name: nginx resources: {} - ports: - - containerPort: 80 readinessProbe: # declare the readiness probe httpGet: # add this line path: / #