1

minikube ssh

$ ps ax | grep kube-proxy
 4191 ?        Ssl    1:36 /usr/local/bin/kube-proxy --config=/var/lib/kube-proxy/config.conf --hostname-override=minikube
22000 pts/0    S+     0:00 grep kube-proxy



$ ls -l /usr/local/bin/kube-proxy
ls: cannot access '/usr/local/bin/kube-proxy': No such file or directory

这是一个功能性的 Minikube,我可以创建 pod,但我无法在 Minikube vm 上找到 Kube-proxy 可执行文件。

答:kube-proxy 作为 Daemonset 运行

kubectl 获取 daemonset -n kube-system

4

2 回答 2

1

Good job Suresh on figuring what this question was about. Hello on SO Deepak kumar Gunjetti in the future please try to ask concrete questions as you ask about binary and the answer is "kube-proxy is a daemonset".

So just as an extension of the answer: With kubectl get all -n kube-system you can find that kube-proxy is indeed a daemonset. Daemonset is a type of object in Kubernetes that will make sure that on any node there will be one running pod of its kind.

You can also view the yaml file of kube-proxy. Either by using kubectl get daemonset.apps/kube-proxy -n kube-system -o yaml or here.

If you are going to look for more Kubernetes components you can find them inside of the minikube VM. You can reach them by minikube ssh and then navigating to Kubernetes dir cd /etc/kubernetes and in the folder manifests you will find the most important ones:

ls /etc/kubernetes/manifests/
addon-manager.yaml  etcd.yaml  kube-apiserver.yaml  kube-controller-manager.yaml  kube-scheduler.yaml
于 2019-06-21T14:29:00.523 回答
0

kubectl get all --all-namespaces 将列出所有命名空间中的大多数 k8s 资源。

Kube-proxy作为 deamonset 部署在 minikube 中。

于 2019-06-21T14:03:02.500 回答