Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kubectl exec and logs not working. #36

Closed
sangeethah opened this issue Nov 22, 2017 · 4 comments
Closed

kubectl exec and logs not working. #36

sangeethah opened this issue Nov 22, 2017 · 4 comments
Assignees
Labels

Comments

@sangeethah
Copy link

rke version v0.0.3-dev

Steps to reproduce the problem:
Create a cluster using hosts from Digitial Ocean provider.
Create user pods.
kubectl exec and logs do not work.

Sangeethas-MBP:~ sangeethahariharan1$ kubectl exec -it k8testnew-0fbtw  bash
Error from server: error dialing backend: dial tcp: lookup sangee-now-rke-5 on 67.207.67.2:53: no such host
Sangeethas-MBP:~ sangeethahariharan1$ kubectl logs k8testnew-0qrpx
Error from server: Get https://sangee-now-rke-5:10250/containerLogs/default/k8testnew-0qrpx/testcontainer: dial tcp: lookup sangee-now-rke-5 on 67.207.67.2:53: no such host
@galal-hussein
Copy link
Contributor

@sangeethah In DO hostnames are not resolvable so kubeapi will not be able to reach the node by hostname, it will cause exec/logs to fail, to solve this you can just specify the following extra arguments for kubeapi service:

extra_args:
  kubelet-preferred-address-types: "InternalIP,ExternalIP,Hostname"

@sangeethah
Copy link
Author

rke version v0.0.4-dev

Steps to reproduce the problem:

used the following extra_args for kube-api service:

extra_args:
  kubelet-preferred-address-types: "InternalIP,ExternalIP,Hostname"

Create a cluster using hosts from Digitial Ocean provider.
Create user pods.
kubectl exec and logs works.

@sangeethah
Copy link
Author

Reopening this issue to support the case where when the advertised_hostname provided is not resolvable there should be no need for user to manually override the default order for kube-api service by providing kubelet-preferred-address-types

@sangeethah
Copy link
Author

rke version v0.0.6-dev

Following configurations works fine:
Able to create K8s cluster successfully.
Able to deploy pods.
Able to launch dashboard addon.
Able to exec/log to containers.

  1. Specify host , internal_address and hostname_override.
    In this case hostname_override is not resolvable:
    nodes:
  • address: ec2-.us-east-2.compute.amazonaws.com
    internal_address:
    hostname_override: mynode1
    user: ubuntu
    role: [controlplane]

nodes get registered with the "hostname_override" value.

There was no extra parameters that were set for kubeapi service:

services:
  etcd:
    image: quay.io/coreos/etcd:latest
  kube-api:
    image: rancher/k8s:v1.8.3-rancher2
  kube-controller:
    image: rancher/k8s:v1.8.3-rancher2
  scheduler:
    image: rancher/k8s:v1.8.3-rancher2
  kubelet:
    image: rancher/k8s:v1.8.3-rancher2
  kubeproxy:
    image: rancher/k8s:v1.8.3-rancher2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants