Install Helm on Virtual Box

4/10/2020

I have three VMs in Virtual box, each of those have 2 interfaces:

  • enp0s3 is going into internet;
  • enp0s8 is the communication between VMs.

I have initiated Kubernetes by forcing the Kubernetes nodes communication on the enp0s8 interface with --apiserver-advertise-address=192.168.56.100 argument because by default it was taking the enp0s3 interface and Kubernetes cluster works fine.

I would like to install Helm in the same manner: forcing to communicate on the enp0s8 interface. If I am doing just helm init and then helm init --upgrade I am getting that it tries to connect to Tiller on the enp0s3, not on the enp0s8:

george@kubernetes-master:~$ helm version
Client: &version.Version{SemVer:"v2.16.5", GitCommit:"89bd14c1541fa93a09492010030fd3699ca65a97", GitTreeState:"clean"}
Error: forwarding ports: error upgrading connection: error dialing backend: dial tcp 10.0.2.102:10250: connect: no route to host

I have tried several arguments of helm init, but I couldn't find the successful one to initiate helm on the second interface. Any idea how can be done and if is possible?

UPDATE

I've managed to install Helm3 with no errors, but the IP of the pod I am getting still from the first interface instead of the second one:

dante@kube-master:~$ kubectl get pods -o wide
NAME                                        READY   STATUS    RESTARTS   AGE   IP           NODE           NOMINATED NODE   READINESS GATES
my-release-nginx-ingress-57467494b4-z2g2w   1/1     Running   0          53s   10.244.2.2   kube-worker2   <none>           <none>

I've deployed the nginx Helm chart with the following commands:

dante@kube-master:~/.kube$ kubectl config view
apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: DATA+OMITTED
    server: https://192.168.56.100:6443
  name: kubernetes
contexts:
- context:
    cluster: kubernetes
    user: kubernetes-admin
  name: kubernetes-admin@kubernetes
current-context: kubernetes-admin@kubernetes
kind: Config
preferences: {}
users:
- name: kubernetes-admin
  user:
    client-certificate-data: REDACTED
    client-key-data: REDACTED
dante@kube-master:~/.kube$ helm install my-ingress-controller nginx/nginx-ingress --kubeconfig /home/dante/.kube/config
NAME: my-ingress-controller
LAST DEPLOYED: Wed Apr 29 18:48:52 2020
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
The NGINX Ingress Controller has been installed.

Any idea how I can deploy the pod on the second interface with Helm?

Thanks, George

-- George FK Arthur
kubernetes
kubernetes-helm

1 Answer

4/14/2020

To investigate where problem may be execute following command:

$ kubectl cluster-info

Execute $ kubectl config view - adjust it to point to proper IP. It looks like Helm doesn't allow to bind to outgoing IP.

Then check firewall status:

$ systemctl status firewalld

Run below commands to stop and disable firewall:

$ systemctl stop firewalld  
$ systemctl disable firewalld

Advice: use newest version of helm- upgrade helm to v3.1.0. There is special plugin to do this - helm-2to3. To upgrade helm follow steps in this documentation: helmv2-v3. See changes in newest version of helm: helm-v3.

Please take a look: helm-kubernetes.

Similar problem: conection-issue-helm.

-- MaggieO
Source: StackOverflow