Re: [kubernetes/kubernetes] kube-apiserver: --advertise-address/--bind-address not working with "blank" ip (#58686)

5 views
Skip to first unread message

k8s-ci-robot

unread,
Jan 23, 2018, 7:42:03 AM1/23/18
to kubernetes/kubernetes, k8s-mirror-api-machinery-bugs, Team mention

@klausenbusk: Reiterating the mentions to trigger a notification:
@kubernetes/sig-api-machinery-bugs

In response to this:

cc @kubernetes/sig-api-machinery-bugs

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.


You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Davanum Srinivas

unread,
Jan 23, 2018, 8:04:00 AM1/23/18
to kubernetes/kubernetes, k8s-mirror-api-machinery-bugs, Team mention

i'd say we fix the comment :)

If not specified, all interfaces will be used (0.0.0.0). (default 0.0.0.0)

Jenny Buckley

unread,
Jan 25, 2018, 4:11:01 PM1/25/18
to kubernetes/kubernetes, k8s-mirror-api-machinery-bugs, Team mention

Sachin Manpathak

unread,
Jan 25, 2018, 7:12:02 PM1/25/18
to kubernetes/kubernetes, k8s-mirror-api-machinery-bugs, Team mention

Happy to volunteer

Cole Mickens

unread,
Jan 25, 2018, 10:51:17 PM1/25/18
to kubernetes/kubernetes, k8s-mirror-api-machinery-bugs, Team mention

@dims Are you saying that's what the comment should be updated to, or that part should be removed?

(This is from me reading through this for the first time, and actually demonstrated by the two cases the OP has posted above)

The --advertise-address does not, in any case, default to --bind-address. It also does not default to 0.0.0.0. In fact, even if you do specify 0.0.0.0, the code still chooses the default interface. https://github.com/kubernetes/apiserver/blob/master/pkg/server/options/server_run_options.go#L77 -> https://github.com/kubernetes/apimachinery/blob/2f1e02d3e57b8fb5206c5326bcb65217edc63a8e/pkg/util/net/interface.go#L383

I think server_run_options.go should be updated to set the default even when --advertise-address="" so that it works like other arguments, like --cloud-provider="". (and the reference to inheriting --bind-address removed, or the code fixed so that it does that as well.) Probably --bind-address="" should get the same fix.

Davanum Srinivas

unread,
Jan 26, 2018, 6:49:40 AM1/26/18
to kubernetes/kubernetes, k8s-mirror-api-machinery-bugs, Team mention

@colemickens makes sense. thanks for digging in. (my first thought was that if there was a mismatch between the help text and functionality then we could have just fixed up the help text, but your analysis makes more sense!)

Sachin Manpathak

unread,
Jan 28, 2018, 1:24:40 PM1/28/18
to kubernetes/kubernetes, k8s-mirror-api-machinery-bugs, Team mention

@colemickens What should be the default? 0.0.0.0? Or should it retain the current behavior of picking up hosts default interface?

k8s-ci-robot

unread,
Jan 28, 2018, 1:35:04 PM1/28/18
to kubernetes/kubernetes, k8s-mirror-api-machinery-bugs, Team mention

@j0gger: GitHub didn't allow me to assign the following users: j0gger.

Note that only kubernetes members and repo collaborators can be assigned.

In response to this:

/assign

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sachin Manpathak

unread,
Jan 28, 2018, 1:35:06 PM1/28/18
to kubernetes/kubernetes, k8s-mirror-api-machinery-bugs, Team mention

/assign

Cole Mickens

unread,
Jan 29, 2018, 8:16:40 PM1/29/18
to kubernetes/kubernetes, k8s-mirror-api-machinery-bugs, Team mention

@j0gger I don't know. I don't know if coercing 0.0.0.0 to default interface was intentional or not. Someone else will have to weigh in.

Sachin Manpathak

unread,
Feb 1, 2018, 9:28:44 AM2/1/18
to kubernetes/kubernetes, k8s-mirror-api-machinery-bugs, Team mention

@smarterclayton @colemickens I'm happy to take this on, but need some direction here. If not you, who can offer some direction here? I am fairly new to Kubernetes.

fejta-bot

unread,
May 2, 2018, 10:58:51 AM5/2/18
to kubernetes/kubernetes, k8s-mirror-api-machinery-bugs, Team mention

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

Azerothian

unread,
May 31, 2018, 8:42:51 PM5/31/18
to kubernetes/kubernetes, k8s-mirror-api-machinery-bugs, Team mention

/remove-lifecycle stale

Terin Stock

unread,
Jun 21, 2018, 7:10:58 PM6/21/18
to kubernetes/kubernetes, k8s-mirror-api-machinery-bugs, Team mention

If blank, all interfaces will be used (0.0.0.0 for all IPv4 interfaces and :: for all IPv6 interfaces).

Based on this description, I was expecting --bind-address to be the way to dual-stack the apiserver.

fejta-bot

unread,
Sep 19, 2018, 8:01:26 PM9/19/18
to kubernetes/kubernetes, k8s-mirror-api-machinery-bugs, Team mention

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

fejta-bot

unread,
Oct 19, 2018, 8:24:50 PM10/19/18
to kubernetes/kubernetes, k8s-mirror-api-machinery-bugs, Team mention

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.

/lifecycle rotten

fejta-bot

unread,
Nov 18, 2018, 8:11:51 PM11/18/18
to kubernetes/kubernetes, k8s-mirror-api-machinery-bugs, Team mention

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.


Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

k8s-ci-robot

unread,
Nov 18, 2018, 8:11:57 PM11/18/18
to kubernetes/kubernetes, k8s-mirror-api-machinery-bugs, Team mention

Closed #58686.

k8s-ci-robot

unread,
Nov 18, 2018, 8:12:06 PM11/18/18
to kubernetes/kubernetes, k8s-mirror-api-machinery-bugs, Team mention

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

v-ilinski

unread,
May 26, 2021, 4:48:32 PM5/26/21
to kubernetes/kubernetes, k8s-mirror-api-machinery-bugs, Team mention

This issue still exists. If kubeadm is used, there's no way to get a kube-apiserver manifest without an "--advertise-address" argument. If it is set to an empty string in kubeadm.conf via the apiServer/extraArgs, the kube-apiserver maniest will have it set to an empty string also, which will prevent kube-apiserver from starting ...due to the error in the description above.

/reopen


You are receiving this because you are on a team that was mentioned.

Reply to this email directly, view it on GitHub, or unsubscribe.

Kubernetes Prow Robot

unread,
May 26, 2021, 4:48:42 PM5/26/21
to kubernetes/kubernetes, k8s-mirror-api-machinery-bugs, Team mention

@v-ilinski: You can't reopen an issue/PR unless you authored it or you are a collaborator.

In response to this:

This issue still exists. If kubeadm is used, there's no way to get a kube-apiserver manifest without an "--advertise-address" argument. If it is set to an empty string in kubeadm.conf via the apiServer/extraArgs, the kube-apiserver maniest will have it set to an empty string also, which will prevent kube-apiserver from starting ...due to the error in the description above.

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Lubomir I. Ivanov

unread,
May 27, 2021, 10:59:21 AM5/27/21
to kubernetes/kubernetes, k8s-mirror-api-machinery-bugs, Team mention

/reopen

Kubernetes Prow Robot

unread,
May 27, 2021, 10:59:33 AM5/27/21
to kubernetes/kubernetes, k8s-mirror-api-machinery-bugs, Team mention

Reopened #58686.

Kubernetes Prow Robot

unread,
May 27, 2021, 10:59:35 AM5/27/21
to kubernetes/kubernetes, k8s-mirror-api-machinery-bugs, Team mention

@neolit123: Reopened this issue.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Kubernetes Prow Robot

unread,
May 27, 2021, 10:59:40 AM5/27/21
to kubernetes/kubernetes, k8s-mirror-api-machinery-bugs, Team mention

@klausenbusk: This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Lubomir I. Ivanov

unread,
May 27, 2021, 11:23:11 AM5/27/21
to kubernetes/kubernetes, k8s-mirror-api-machinery-bugs, Team mention

/remove-lifecycle rotten

Daniel Smith

unread,
May 27, 2021, 1:30:22 PM5/27/21
to kubernetes/kubernetes, k8s-mirror-api-machinery-bugs, Team mention

I suspect the code is treating omitting the argument completely as different than passing it the empty string.

Federico Bongiovanni

unread,
May 27, 2021, 4:14:16 PM5/27/21
to kubernetes/kubernetes, k8s-mirror-api-machinery-bugs, Team mention

/help
/triage accepted

Kubernetes Prow Robot

unread,
May 27, 2021, 4:14:18 PM5/27/21
to kubernetes/kubernetes, k8s-mirror-api-machinery-bugs, Team mention

@fedebongio:
This request has been marked as needing help from a contributor.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help command.

In response to this:

/help
/triage accepted

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

David Rivera

unread,
May 27, 2021, 6:20:59 PM5/27/21
to kubernetes/kubernetes, k8s-mirror-api-machinery-bugs, Team mention

@v-ilinski I can't seem to reproduce this on my machine with kubeadm, from a clean install I ran kubeadm init --config config.yaml

my relevant config:

...
apiServer:
  timeoutForControlPlane: 4m0s
apiVersion: kubeadm.k8s.io/v1beta2
certificatesDir: /etc/kubernetes/pki
clusterName: kubernetes
controllerManager:
  extraArgs:
    advertiseAddress: ""
...
imageRepository: k8s.gcr.io
kind: ClusterConfiguration
kubernetesVersion: v1.20.1
...

note I tested this with localAPIEndpoint.advertiseAddress not set, then again with it set to ""

In either case my kube-apiserver runs successfully.

My setup:

Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.1", GitCommit:"c4d752765b3bbac2237bf87cf0b1c2e307844666", GitTreeState:"clean", BuildDate:"2020-12-18T12:09:25Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.1", GitCommit:"c4d752765b3bbac2237bf87cf0b1c2e307844666", GitTreeState:"clean", BuildDate:"2020-12-18T12:00:47Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}

I could have missed something, can you still reproduce this? If so could you provide the steps?

David Rivera

unread,
May 27, 2021, 6:28:55 PM5/27/21
to kubernetes/kubernetes, k8s-mirror-api-machinery-bugs, Team mention

/assign

v-ilinski

unread,
May 28, 2021, 3:01:07 AM5/28/21
to kubernetes/kubernetes, k8s-mirror-api-machinery-bugs, Team mention

@duhruh the extraArgs/advertise-address should be under the apiServer, rather than controllerManager. (note advertise-address instead of advertiseAddress)

...
apiServer:
  timeoutForControlPlane: 4m0s
  extraArgs:
    advertise-address: ""
...

Would you be able to share the resulting kube-apiserver.yaml manifest? Mine looks like:

...
spec:
  containers:
  - command:
    - kube-apiserver
    - --advertise-address=
...

Kubernetes Triage Robot

unread,
Aug 26, 2021, 3:21:16 AM8/26/21
to kubernetes/kubernetes, k8s-mirror-api-machinery-bugs, Team mention

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale


You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

Triage notifications on the go with GitHub Mobile for iOS or Android.

Kubernetes Triage Robot

unread,
Sep 25, 2021, 3:48:34 AM9/25/21
to kubernetes/kubernetes, k8s-mirror-api-machinery-bugs, Team mention

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

Kubernetes Triage Robot

unread,
Oct 25, 2021, 4:09:02 AM10/25/21
to kubernetes/kubernetes, k8s-mirror-api-machinery-bugs, Team mention

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

Kubernetes Prow Robot

unread,
Oct 25, 2021, 4:09:20 AM10/25/21
to kubernetes/kubernetes, k8s-mirror-api-machinery-bugs, Team mention

Closed #58686.

Kubernetes Prow Robot

unread,
Oct 25, 2021, 4:09:20 AM10/25/21
to kubernetes/kubernetes, k8s-mirror-api-machinery-bugs, Team mention

@k8s-triage-robot: Closing this issue.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Reply all
Reply to author
Forward
0 new messages