If you have installed an application on a Kubernetes cluster
in Google Cloud Console and you need to update a specific file
within that application, you won't typically find the application's
files directly on the Compute Engine VM instances
Locate the Kubernetes Deployment or Pod: Use the Kubernetes
command-line tool:-
kubectl get deployments
Once you have identified the deployment or pod,
you can access the container running your application
open a shell session inside the container:
kubectl exec -it <pod-name> -- /bin/sh
update the file: within the container's shell, navigate to the location of the file , want to update and make the necessary modification
for example :-
cd /app
vi myfile.txt
kubectl get pods --all-namespaces
kubectl exec test-superset-superset-0 -- sh
kubectl exec -it test-superset-superset-0 -- sh
kubectl cp /path/to/your/image.png [POD_NAME]:/usr/local/lib/python3.9/dist-packages/superset/static/assets/images/superset-logo-horiz.png
No comments:
Post a Comment