Horje
kubectl exec Code Example
kubectl exec
kubectl exec -it <pod-name> -n <namespace> -- <command>

example:
--------
kubectl exec -it tag-mgmt -n my-namespace -- /bin/sh
kubectl exec -it timescaledb -n data-store -- psql

timescaledb -> is pod name 
data-store -> is namespace
psql -> is command that we can run for postgres
kubectl exec bash
kubectl exec --stdin --tty shell-demo -- /bin/bash
kubernetes /bin/bash
sudo kubectl -n <namespace> --context=<context-with-access> exec <pod-name> -it /bin/bash

ex:
sudo kubectl -n default --context=staging-devops exec microservice1-jd830k-880 -it /bin/bash
kubectl exec ls -lah
kubectl exec <pod_name> -- ls -la /




Shell

Related
untar gz file ubuntu Code Example untar gz file ubuntu Code Example
specify ssh key to use Code Example specify ssh key to use Code Example
windows kill process Code Example windows kill process Code Example
Check for process and kill if running Linux Code Example Check for process and kill if running Linux Code Example
python install dotenv Code Example python install dotenv Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10