Home
About Us
Contact Us
Bookmark
Saved Bookmarks
Current Affairs
General Knowledge
Chemical Engineering
UPSEE
BSNL
ISRO
BITSAT
Amazon
ORACLE
Verbal Ability
→
Kubernetes (Kubectl) Cheat Sheet
→
Frequently Asked Questions in Kubernetes (Kubectl) Cheat Sheet
→
Interacting with Deployments and Services
1.
Interacting with Deployments and Services
Answer»
Commands
Description
kubectl logs deploy/my-deployment
Dump Pod logs for a Deployment (single-container case).
kubectl logs deploy/my-deployment -c my-contain
dump Pod logs for a Deployment (multi-container case).
kubectl port-forward svc/my-service 5000
To listen on local port 5000 and forward to port 5000 on Service backend.
kubectl port-forward deploy/my-deployment 5000:6000
To listen on local port 5000 and forward to port 6000 on a Pod created by <my-deployment>.
kubectl exec deploy/my-deployment -- ls
To run command in first Pod and first container in Deployment (single- or multi-container cases).
Show Answer
Discussion
No Comment Found
Post Comment
Related InterviewSolutions
Copy files and directories to and from containers
Interacting with Deployments and Services
For Cluster Introspection
Changing Resource Attributes
Kubernetes Commands
Kubernetes Terminology
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply
Your experience on this site will be improved by allowing cookies. Read
Cookie Policy
Reject
Allow cookies