Ask Your Question
0

how i can run kubectl get pods in controller?

asked 2019-01-30 04:38:09 -0500

novainfinite gravatar image

i install magnum in rocky (https://docs.openstack.org/magnum/lat...) after that i run

$ mkdir -p ~/clusters/kubernetes-cluster
$ $(openstack coe cluster config kubernetes-cluster --dir ~/clusters/kubernetes-cluster)
export KUBECONFIG=/home/user/clusters/kubernetes-cluster/config

that is every thing ok until now but when i run

kubectl -n kube-system get po
**controller does not understand kebectl
Command 'kubectl' not found, but can be installed with:

snap install kubectl**

it is obvios that i do not install kuberneties in my controller because the container should run in vm like fedora

so should i install kubernetis on controller? if yes why it is neede if no why should i install kubernetis in a controller that does not create pod and how controller understand the pod of vm in compute

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
1

answered 2019-01-30 05:04:58 -0500

The purpose of Kubernetes is to run apps in containers. Magnum creates and provisions Nova instances with Kubernetes so that they can be used as container hosts. It does not manage the containers, only the container hosts.

You need kubectl to manage containers. You can install it on any computer, as long as this computer has network connectivity to the K8s cluster. You can install it on your OpenStack controller, but you don’t have to.

You don’t install K8s at all. Magnum takes care of the K8s installation on Nova instances.

edit flag offensive delete link more

Comments

but why the document said run

kubectl -n kube-system get po

and obviosly controller do not have kuberneties

novainfinite gravatar imagenovainfinite ( 2019-01-30 05:19:26 -0500 )edit

Install kubectl, and you will be happy.

Note: kubectl is not Kubernetes. It is the Kubernetes client.

Bernd Bausch gravatar imageBernd Bausch ( 2019-01-30 05:49:51 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2019-01-30 04:38:09 -0500

Seen: 21 times

Last updated: Jan 30