How do you create a temporary pod and verify a http connectivity to a service svc1 that exposed a port 80?

Experience Level: Senior
Tags: Kubernetes

Answer

Run the following command:

kubectl run tmp --image=busybox --rm -i -- /bin/sh -c "wget -m 5 svc1:80"

The -m 5 parameter defines maximum time allowed for the transfer. It is used as a 5 second timeout. If the response is not transferred by that time, wget stops.

Comments

No Comments Yet.
Be the first to tell us what you think.
Kubernetes Certified Application Developer (CKAD) preparation
Kubernetes Certified Application Developer (CKAD) preparation

Are you learning Kubernetes ? Try our test we designed to help you progress faster.

Test yourself
Kubernetes
Kubernetes

Are you learning Kubernetes ? Try our test we designed to help you progress faster.

Test yourself
25 Kubernetes questions that will help you get certified and become more efficient with K8s
25 Kubernetes questions that will help you get certified and become more efficient with K8s

Are you learning Kubernetes ? Try our test we designed to help you progress faster.

Test yourself