kubernetes - connect to shell terminal of other container in a pod -


when define multiple containers in pod/pod template 1 container running agent , php-fpm, how can access each other? need agent container connect php-fpm shell , need execute few steps interactively through agent container.

based on understanding, can package kubectl agent container , use kubectl exec -it <container id> sh connect container. don't want agent container have more privilege connect target container php-fpm.

is there better way agent container connect php-fpm shell , execute commands interactively?

also, wasn't successful in running kubectl container when using minikube due following errors

docker run -it -v ~/.kube:/root/.kube lachlanevenson/k8s-kubectl nodes error in configuration: * unable read client-cert /users/user/.minikube/apiserver.crt minikube due open /users/user/.minikube/apiserver.crt: no such file or directory * unable read client-key /users/user/.minikube/apiserver.key minikube due open /users/user/.minikube/apiserver.key: no such file or directory * unable read certificate-authority /users/user/.minikube/ca.crt minikube due open /users/user/.minikube/ca.crt: no such file or directory

docker run -it -v ~/.kube:/root/.kube lachlanevenson/k8s-kubectl nodes

  1. first off, every pod within k8s cluster has own k8s credentials provided /var/run/secrets/kubernetes.io/serviceaccount/token, , there absolutely no need attempt volume mount home directory docker container
  2. the reason getting error client-cert because contents of ~/.kube merely strings point externally defined ssl key, ssl certificate, , ssl ca certificate defined inside ~/.kube/config -- won't speak fixing problem further since there no reason using approach

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -