ExamGecko
Question list
Search
Search

List of questions

Search

Question 32 - CKA discussion

Report
Export

Create a pod with environment variables as var1=value1.Check the environment variable in pod

A.
See the solution below.
Answers
A.
See the solution below.
Suggested answer: A

Explanation:

kubectl run nginx --image=nginx --restart=Never --env=var1=value1

# then

kubectl exec -it nginx -- env

# or

kubectl exec -it nginx -- sh -c 'echo $var1'

# or

kubectl describe po nginx | grep value1

asked 18/09/2024
Santanu Roy
34 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first