GithubHelp home page GithubHelp logo

kubectl exec and logs not working. about rke HOT 4 CLOSED

rancher avatar rancher commented on July 29, 2024
kubectl exec and logs not working.

from rke.

Comments (4)

galal-hussein avatar galal-hussein commented on July 29, 2024

@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"

from rke.

sangeethah avatar sangeethah commented on July 29, 2024

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.

from rke.

sangeethah avatar sangeethah commented on July 29, 2024

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

from rke.

sangeethah avatar sangeethah commented on July 29, 2024

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

from rke.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.