2017-10-28 17:11:58 +00:00
---
title: Troubleshooting kubeadm
---
2018-05-05 16:00:51 +00:00
{{% capture overview %}}
2017-10-28 17:11:58 +00:00
As with any program, you might run into an error using or operating it. Below we have listed
common failure scenarios and have provided steps that will help you to understand and hopefully
fix the problem.
If your problem is not listed below, please follow the following steps:
- If you think your problem is a bug with kubeadm:
- Go to [github.com/kubernetes/kubeadm ](https://github.com/kubernetes/kubeadm/issues ) and search for existing issues.
- If no issue exists, please [open one ](https://github.com/kubernetes/kubeadm/issues/new ) and follow the issue template.
2018-06-12 15:13:27 +00:00
- If you are unsure about how kubeadm or kubernetes works, and would like to receive
support about your question, please ask on Slack in #kubeadm , or open a question on StackOverflow. Please include
2017-10-28 17:11:58 +00:00
relevant tags like `#kubernetes` and `#kubeadm` so folks can help you.
If your cluster is in an error state, you may have trouble in the configuration if you see Pod statuses like `RunContainerError` ,
`CrashLoopBackOff` or `Error` . If this is the case, please read below.
2018-05-05 16:00:51 +00:00
{{% /capture %}}
2017-10-28 17:11:58 +00:00
2018-03-05 08:43:51 +00:00
#### `ebtables` or some similar executable not found during installation
2017-10-28 17:11:58 +00:00
If you see the following warnings while running `kubeadm init`
2018-06-12 15:13:27 +00:00
```sh
[preflight] WARNING: ebtables not found in system path
[preflight] WARNING: ethtool not found in system path
2017-10-28 17:11:58 +00:00
```
2018-06-12 15:13:27 +00:00
Then you may be missing `ebtables` , `ethtool` or a similar executable on your node. You can install them with the following commands:
2017-10-28 17:11:58 +00:00
2018-06-12 15:13:27 +00:00
- For Ubuntu/Debian users, run `apt install ebtables ethtool` .
2017-12-06 01:36:54 +00:00
- For CentOS/Fedora users, run `yum install ebtables ethtool` .
2017-11-12 13:15:59 +00:00
2017-12-06 01:36:54 +00:00
#### kubeadm blocks waiting for control plane during installation
2017-11-12 13:15:59 +00:00
2017-12-06 01:36:54 +00:00
If you notice that `kubeadm init` hangs after printing out the following line:
2017-10-28 17:11:58 +00:00
2018-06-12 15:13:27 +00:00
```sh
[apiclient] Created API client, waiting for the control plane to become ready
2017-10-28 17:11:58 +00:00
```
2017-12-06 01:36:54 +00:00
This may be caused by a number of problems. The most common are:
2017-11-14 06:34:18 +00:00
2017-12-06 01:36:54 +00:00
- network connection problems. Check that your machine has full network connectivity before continuing.
- the default cgroup driver configuration for the kubelet differs from that used by Docker.
Check the system log file (e.g. `/var/log/message` ) or examine the output from `journalctl -u kubelet` . If you see something like the following:
2017-11-12 13:15:59 +00:00
2017-12-06 01:36:54 +00:00
```shell
2018-06-12 15:13:27 +00:00
error: failed to run Kubelet: failed to create kubelet:
2017-12-06 01:36:54 +00:00
misconfiguration: kubelet cgroup driver: "systemd" is different from docker cgroup driver: "cgroupfs"
```
2018-01-10 08:24:59 +00:00
There are two common ways to fix the cgroup driver problem:
2018-02-04 22:17:05 +00:00
1. Install docker again following instructions
2018-01-09 08:51:02 +00:00
[here ](/docs/setup/independent/install-kubeadm/#installing-docker ).
2018-01-11 02:07:26 +00:00
1. Change the kubelet config to match the Docker cgroup driver manually, you can refer to
2018-03-05 08:43:51 +00:00
[Configure cgroup driver used by kubelet on Master Node ](/docs/setup/independent/install-kubeadm/#configure-cgroup-driver-used-by-kubelet-on-master-node )
2018-01-11 02:07:26 +00:00
for detailed instructions.
2018-03-05 08:43:51 +00:00
2017-12-06 01:36:54 +00:00
- control plane Docker containers are crashlooping or hanging. You can check this by running `docker ps` and investigating each container by running `docker logs` .
2017-11-14 06:34:18 +00:00
2018-05-18 17:15:53 +00:00
#### kubeadm blocks when removing managed containers
The following could happen if Docker halts and does not remove any Kubernetes-managed containers:
```bash
sudo kubeadm reset
[preflight] Running pre-flight checks
[reset] Stopping the kubelet service
[reset] Unmounting mounted directories in "/var/lib/kubelet"
[reset] Removing kubernetes-managed containers
(block)
```
A possible solution is to restart the Docker service and then re-run `kubeadm reset` :
2018-06-12 15:13:27 +00:00
2018-05-18 17:15:53 +00:00
```bash
sudo systemctl restart docker.service
sudo kubeadm reset
```
2017-10-28 17:11:58 +00:00
2018-06-12 15:13:27 +00:00
Inspecting the logs for docker may also be useful:
```sh
journalctl -ul docker
```
2017-10-28 17:11:58 +00:00
#### Pods in `RunContainerError`, `CrashLoopBackOff` or `Error` state
2018-06-12 15:13:27 +00:00
Right after `kubeadm init` there should not be any pods in these states.
- If there are pods in one of these states _right after_ `kubeadm init` , please open an
issue in the kubeadm repo. `coredns` (or `kube-dns` ) should be in the `Pending` state
until you have deployed the network solution.
- If you see Pods in the `RunContainerError` , `CrashLoopBackOff` or `Error` state
after deploying the network solution and nothing happens to `coredns` (or `kube-dns` ),
Release docs for Kubernetes 1.11 (#9171)
* Seperate priority and preemption (#8144)
* Doc about PID pressure condition. (#8211)
* Doc about PID pressure condition.
Signed-off-by: Da K. Ma <klaus1982.cn@gmail.com>
* "so" -> "too"
* Update version selector for 1.11
* StorageObjectInUseProtection is GA (#8291)
* Feature gate: StorageObjectInUseProtection is GA
Update feature gate reference for 1.11
* Trivial commit to re-trigger Netlify
* CRIContainerLogRotation is Beta in 1.11 (#8665)
* Seperate priority and preemption (#8144)
* CRIContainerLogRotation is Beta in 1.11
xref: kubernetes/kubernetes#64046
* Bring StorageObjectInUseProtection feature to GA (#8159)
* StorageObjectInUseProtection is GA (#8291)
* Feature gate: StorageObjectInUseProtection is GA
Update feature gate reference for 1.11
* Trivial commit to re-trigger Netlify
* Bring StorageObjectInUseProtection feature to GA
StorageObjectInUseProtection is Beta in K8s 1.10.
It's brought to GA in K8s 1.11.
* Fixed typo and added feature state tags.
* Remove KUBE_API_VERSIONS doc (#8292)
The support to the KUBER_API_VERSIONS environment variable is completely
dropped (no deprecation). This PR removes the related doc in
release-1.11.
xref: kubernetes/kubernetes#63165
* Remove InitialResources from admission controllers (#8293)
The feature (was experimental) is dropped in 1.11.
xref: kubernetes/kubernetes#58784
* Remove docs related to in-tree support to GPU (#8294)
* Remove docs related to in-tree support to GPU
The in-tree support to GPU is completely removed in release 1.11.
This PR removes the related docs in release-1.11 branch.
xref: kubernetes/kubernetes#61498
* Update content updated by PR to Hugo syntax
Signed-off-by: Misty Stanley-Jones <mistyhacks@google.com>
* Update the doc about extra volume in kubeadm config (#8453)
Signed-off-by: Xianglin Gao <xianglin.gxl@alibaba-inc.com>
* Update CRD Subresources for 1.11 (#8519)
* coredns: update notes in administer-cluster/coredns.md (#8697)
CoreDNS is installed by default in 1.11.
Add notes on how to install kube-dns instead.
Update notes about CoreDNS->CoreDNS upgrades as in 1.11
the Corefile is retained.
Add example on upgrading from kube-dns to CoreDNS.
* kubeadm-alpha: CoreDNS related changes (#8727)
Update note about CoreDNS feature gate.
This change also updates a tab as a kubeadm sub-command
will change.
It looks for a new generated file:
generated/kubeadm_alpha_phase_addon_coredns.md
instead of:
generated/kubeadm_alpha_phase_addon_kube-dns.md
* Update cloud controller manager docs to beta 1.11 (#8756)
* Update cloud controller manager docs to beta 1.11
* Use Hugo shortcode for feature state
* kubeadm-upgrade: include new command `kubeadm upgrade diff` (#8617)
Also:
- Include note that this was added in 1.11.
- Modify the note about upgrade guidance.
* independent: update CoreDNS mentions for kubeadm (#8753)
Give CoreDNS instead of kube-dns examples in:
- docs/setup/independent/create-cluster-kubeadm.md
- docs/setup/independent/troubleshooting-kubeadm.md
* update 1.11 --server-print info (#8870)
* update 1.11 --server-print info
* Copyedit
* Mark ExpandPersistentVolumes feature to beta (#8778)
* Update version selector for 1.11
* Mark ExpandPersistentVolumes Beta
xref: kubernetes/kubernetes#64288
* fix shortcode, add placeholder files to fix deploy failures (#8874)
* declare ipvs ga (#8850)
* kubeadm: update info about CoreDNS in kubeadm-init.md (#8728)
Add info to install kube-dns instead of CoreDNS, as CoreDNS
is the default DNS server in 1.11.
Add notes that kubeadm config images can be used to list and pull
the required images in 1.11.
* kubeadm: update implementation-details.md about CoreDNS (#8829)
- Replace examples from kube-dns to CoreDNS
- Add notes about the CoreDNS feature gate status in 1.11
- Add note that the service name for CoreDNS is also
called `kube-dns`
* Update block device support for 1.11 (#8895)
* Update block device support for 1.11
* Copyedits
* Fix typo 'fiber channel' (#8957)
Signed-off-by: Misty Stanley-Jones <mistyhacks@google.com>
* kubeadm-upgrade: add the 'node [config]' sub-command (#8960)
- Add includes for the generated pages
- Include placeholder generated pages
* kubeadm-init: update the example for the MasterConfiguration (#8958)
- include godocs link for MasterConfiguration
- include example MasterConfiguration
- add note that `kubeadm config print-default` can be used
* kubeadm-config: include new commands (#8862)
Add notes and includes for these new commands in 1.11:
- kubeadm config print-default
- kubeadm config migrate
- kubeadm config images list
- kubeadm config images pull
Include placeholder generated files for the above.
* administer-cluster/coredns: include more changes (#8985)
It was requested that for this page a couple of methods
should be outlined:
- manual installation for CoreDNS explained at the Kubernetes
section of the GitHub project for CoreDNS
- installation and upgrade via kubeadm
Make the above changes and also add a section "About CoreDNS".
This commit also lowercases a section title.
* Update CRD subresources doc for 1.11 (#8918)
* Add docs for volume expansion and online resizing (#8896)
* Add docs for volume expansion going beta
* Copyedit
* Address feedback
* Update exec plugin docs with TLS credentials (#8826)
* Update exec plugin docs with TLS credentials
kubernetes/kubernetes#61803 implements TLS client credential support for
1.11.
* Copyedit
* More copyedits for clarification
* Additional copyedit
* Change token->credential
* NodeRestriction admission prevents kubelet taint removal (#8911)
* dns-custom-namerserver: break down the page into mutliple sections (#8900)
* dns-custom-namerserver: break down the page into mutliple sections
This page is currently about kube-dns and is a bit outdated.
Introduce the heading `# Customizing kube-dns`.
Introduce a separate section about CoreDNS.
* Copyedits, fix headings for customizing DNS
Hey Lubomir,
I coypedited pretty heavily because this workflow is so much easier for docs and because I'm trying to help improve everything touching kubeadm as much as possible.
But there's one outstanding issue wrt headings and intro content: you can't add a heading 1 to a topic to do what you wanted to do. The page title in the front matter is rendered as a heading 1 and everything else has to start at heading 2. (We still need to doc this better in the docs contributing content, I know.)
Instead, I think we need to rewrite the top-of-page intro content to explain better the relationship between kube-dns and CoreDNS. I'm happy to write something, but I thought I'd push this commit first so you can see what I'm doing.
Hope it's all clear -- ping here or on Slack with any questions ~ Jennifer
* Interim fix for talking about CoreDNS
* Fix CoreDNS details
* PSP readOnly hostPath (#8898)
* Add documentation for crictl (#8880)
* Add documentation for crictl
* Copyedit
Signed-off-by: Misty Stanley-Jones <mistyhacks@google.com>
* Final copyedit
* VolumeSubpathEnvExpansion alpha feature (#8835)
* Note that Heapster is deprecated (#8827)
* Note that Heapster is deprecated
This notes that Heapster is deprecated, and migrates the relevant
docs to talk about metrics-server or other solutions by default.
* Copyedits and improvements
Signed-off-by: Misty Stanley-Jones <mistyhacks@google.com>
* Address feedback
* fix shortcode to troubleshoot deploy (#9057)
* update dynamic kubelet config docs for v1.11 (#8766)
* update dynamic kubelet config docs for v1.11
* Substantial copyedit
* Address feedback
* Reference doc for kubeadm (release-1.11) (#9044)
* Reference doc for kubeadm (release-1.11)
* fix shortcode to troubleshoot deploy (#9057)
* Reference doc for kube-components (release-1.11) (#9045)
* Reference doc for kube-components (release-1.11)
* Update cloud-controller-manager.md
* fix shortcode to troubleshoot deploy (#9057)
* Documentation on lowercasing kubeadm init apiserver SANs (#9059)
* Documentation on lowercasing kubeadm init apiserver SANs
* fix shortcode to troubleshoot deploy (#9057)
* Clarification in dynamic Kubelet config doc (#9061)
* Promote sysctls to Beta (#8804)
* Promote sysctls to Beta
* Copyedits
Signed-off-by: Misty Stanley-Jones <mistyhacks@google.com>
* Review comments
* Address feedback
* More feedback
* kubectl reference docs for 1.11 (#9080)
* Update Kubernetes API 1.11 ref docs (#8977)
* Update v1alpha1 to v1beta1.
* Adjust left nav for 1.11 ref docs.
* Trim list of old ref docs.
* Update Federation API ref docs for 1.11. (#9064)
* Update Federation API ref docs for 1.11.
* Add titles.
* Update definitions.html
* CRD versioning Public Documentation (#8834)
* CRD versioning Public Documentation
* Copyedit
Signed-off-by: Misty Stanley-Jones <mistyhacks@google.com>
* Address feedback
* More rewrites
* Address feedback
* Update main CRD page in light of versioning
* Reorg CRD docs
* Further reorg
* Tweak title
* CSI documentation update for raw block volume support (#8927)
* CSI documetation update for raw block volume support
* minor edits for "CSI raw block volume support"
Some small grammar and style nits.
* minor CSIBlockVolume edits
* Update kubectl component ref page for 1.11. (#9094)
* Update kubectl component ref page for 1.11.
* Add title. Replace stevepe with username.
* crd versioning doc: fix nits (#9142)
* Update `DynamicKubeletConfig` feature to beta (#9110)
xref: kubernetes/kubernetes#64275
* Documentation for dynamic volume limits based on node type (#8871)
* add cos for storage limits
* Update docs specific for aws and gce
* fix some minor things
* Update storage-limits.md
* Add k8s version to feature-state shortcode
* The Doc update for ScheduleDaemonSetPods (#8842)
Signed-off-by: Da K. Ma <klaus1982.cn@gmail.com>
* Update docs related to PersistentVolumeLabel admission control (#9109)
The said admission controller is disabled by default in 1.11
(kubernetes/kubernetes#64326) and scheduled to be removed in future
release.
* client exec auth: updates for 1.11 (#9154)
* Updates HA kubeadm docs (#9066)
* Updates HA kubeadm docs
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* kubeadm HA - Add stacked control plane steps
* ssh instructions and some typos in the bash scripts
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* Fix typos and copypasta errors
* Fix rebase issues
* Integrate more changes
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* copyedits, layout and formatting fixes
* final copyedits
* Adds a sanity check for load balancer connection
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* formatting fixes, copyedits
* fix typos, formatting
* Document the Pod Ready++ feature (#9180)
Closes: #9107
Xref: kubernetes/kubernetes#64057
* Mention 'KubeletPluginsWatcher' feature (#9177)
* Mention 'KubeletPluginsWatcher' feature
This feature is more developers oriented than users oriented, so simply
mention it in the feature gate should be fine.
In future, when the design doc is migrated from Google doc to the
kubernetes/community repo, we can add links to it for users who want to
dig deeper.
Closes: #9108
Xref: kubernetes/kubernetes#63328, kubernetes/kubernetes#64605
* Copyedit
* Amend dynamic volume list docs (#9181)
The dynamic volume list feature has been documented but the feature gate
related was not there yet.
Closes: #9105
* Document for service account projection (#9182)
This adds docs for the service account projection feature.
Xref: kubernetes/kubernetes#63819, kubernetes/community#1973
Closes: #9102
* Update pod priority and preemption user docs (#9172)
* Update pod priority and preemption user docs
* Copyedit
* Documentation on setting node name with Kubeadm (#8925)
* Documentation on setting node name with Kubeadm
* copyedit
* Add kubeadm upgrade docs for 1.11 (#9089)
* Add kubeadm upgrade docs for 1.11
* Initial docs review feedback
* Add 1-11 to outline
* Fix formatting on tab blocks
* Move file to correct location
* Add `kubeadm upgrade node config` step
* Overzealous ediffing
* copyedit, fix lists and headings
* clarify --force flag for fixing bad state
* Get TOML ready for 1.11 release
* Blog post for 1.11 release (#9254)
* Blog post for 1.11 release
* Update 2018-06-26-kubernetes-1.11-release-announcement.md
* Update 2018-06-26-kubernetes-1.11-release-announcement.md
* Update 2018-06-26-kubernetes-1.11-release-announcement.md
2018-06-27 22:26:18 +00:00
it's very likely that the Pod Network solution and nothing happens to the DNS server, it's very
likely that the Pod Network solution that you installed is somehow broken. You
might have to grant it more RBAC privileges or use a newer version. Please file
2018-06-12 15:13:27 +00:00
an issue in the Pod Network providers' issue tracker and get the issue triaged there.
2017-10-28 17:11:58 +00:00
2018-06-12 15:13:27 +00:00
#### `coredns` (or `kube-dns`) is stuck in the `Pending` state
2017-10-28 17:11:58 +00:00
Release docs for Kubernetes 1.11 (#9171)
* Seperate priority and preemption (#8144)
* Doc about PID pressure condition. (#8211)
* Doc about PID pressure condition.
Signed-off-by: Da K. Ma <klaus1982.cn@gmail.com>
* "so" -> "too"
* Update version selector for 1.11
* StorageObjectInUseProtection is GA (#8291)
* Feature gate: StorageObjectInUseProtection is GA
Update feature gate reference for 1.11
* Trivial commit to re-trigger Netlify
* CRIContainerLogRotation is Beta in 1.11 (#8665)
* Seperate priority and preemption (#8144)
* CRIContainerLogRotation is Beta in 1.11
xref: kubernetes/kubernetes#64046
* Bring StorageObjectInUseProtection feature to GA (#8159)
* StorageObjectInUseProtection is GA (#8291)
* Feature gate: StorageObjectInUseProtection is GA
Update feature gate reference for 1.11
* Trivial commit to re-trigger Netlify
* Bring StorageObjectInUseProtection feature to GA
StorageObjectInUseProtection is Beta in K8s 1.10.
It's brought to GA in K8s 1.11.
* Fixed typo and added feature state tags.
* Remove KUBE_API_VERSIONS doc (#8292)
The support to the KUBER_API_VERSIONS environment variable is completely
dropped (no deprecation). This PR removes the related doc in
release-1.11.
xref: kubernetes/kubernetes#63165
* Remove InitialResources from admission controllers (#8293)
The feature (was experimental) is dropped in 1.11.
xref: kubernetes/kubernetes#58784
* Remove docs related to in-tree support to GPU (#8294)
* Remove docs related to in-tree support to GPU
The in-tree support to GPU is completely removed in release 1.11.
This PR removes the related docs in release-1.11 branch.
xref: kubernetes/kubernetes#61498
* Update content updated by PR to Hugo syntax
Signed-off-by: Misty Stanley-Jones <mistyhacks@google.com>
* Update the doc about extra volume in kubeadm config (#8453)
Signed-off-by: Xianglin Gao <xianglin.gxl@alibaba-inc.com>
* Update CRD Subresources for 1.11 (#8519)
* coredns: update notes in administer-cluster/coredns.md (#8697)
CoreDNS is installed by default in 1.11.
Add notes on how to install kube-dns instead.
Update notes about CoreDNS->CoreDNS upgrades as in 1.11
the Corefile is retained.
Add example on upgrading from kube-dns to CoreDNS.
* kubeadm-alpha: CoreDNS related changes (#8727)
Update note about CoreDNS feature gate.
This change also updates a tab as a kubeadm sub-command
will change.
It looks for a new generated file:
generated/kubeadm_alpha_phase_addon_coredns.md
instead of:
generated/kubeadm_alpha_phase_addon_kube-dns.md
* Update cloud controller manager docs to beta 1.11 (#8756)
* Update cloud controller manager docs to beta 1.11
* Use Hugo shortcode for feature state
* kubeadm-upgrade: include new command `kubeadm upgrade diff` (#8617)
Also:
- Include note that this was added in 1.11.
- Modify the note about upgrade guidance.
* independent: update CoreDNS mentions for kubeadm (#8753)
Give CoreDNS instead of kube-dns examples in:
- docs/setup/independent/create-cluster-kubeadm.md
- docs/setup/independent/troubleshooting-kubeadm.md
* update 1.11 --server-print info (#8870)
* update 1.11 --server-print info
* Copyedit
* Mark ExpandPersistentVolumes feature to beta (#8778)
* Update version selector for 1.11
* Mark ExpandPersistentVolumes Beta
xref: kubernetes/kubernetes#64288
* fix shortcode, add placeholder files to fix deploy failures (#8874)
* declare ipvs ga (#8850)
* kubeadm: update info about CoreDNS in kubeadm-init.md (#8728)
Add info to install kube-dns instead of CoreDNS, as CoreDNS
is the default DNS server in 1.11.
Add notes that kubeadm config images can be used to list and pull
the required images in 1.11.
* kubeadm: update implementation-details.md about CoreDNS (#8829)
- Replace examples from kube-dns to CoreDNS
- Add notes about the CoreDNS feature gate status in 1.11
- Add note that the service name for CoreDNS is also
called `kube-dns`
* Update block device support for 1.11 (#8895)
* Update block device support for 1.11
* Copyedits
* Fix typo 'fiber channel' (#8957)
Signed-off-by: Misty Stanley-Jones <mistyhacks@google.com>
* kubeadm-upgrade: add the 'node [config]' sub-command (#8960)
- Add includes for the generated pages
- Include placeholder generated pages
* kubeadm-init: update the example for the MasterConfiguration (#8958)
- include godocs link for MasterConfiguration
- include example MasterConfiguration
- add note that `kubeadm config print-default` can be used
* kubeadm-config: include new commands (#8862)
Add notes and includes for these new commands in 1.11:
- kubeadm config print-default
- kubeadm config migrate
- kubeadm config images list
- kubeadm config images pull
Include placeholder generated files for the above.
* administer-cluster/coredns: include more changes (#8985)
It was requested that for this page a couple of methods
should be outlined:
- manual installation for CoreDNS explained at the Kubernetes
section of the GitHub project for CoreDNS
- installation and upgrade via kubeadm
Make the above changes and also add a section "About CoreDNS".
This commit also lowercases a section title.
* Update CRD subresources doc for 1.11 (#8918)
* Add docs for volume expansion and online resizing (#8896)
* Add docs for volume expansion going beta
* Copyedit
* Address feedback
* Update exec plugin docs with TLS credentials (#8826)
* Update exec plugin docs with TLS credentials
kubernetes/kubernetes#61803 implements TLS client credential support for
1.11.
* Copyedit
* More copyedits for clarification
* Additional copyedit
* Change token->credential
* NodeRestriction admission prevents kubelet taint removal (#8911)
* dns-custom-namerserver: break down the page into mutliple sections (#8900)
* dns-custom-namerserver: break down the page into mutliple sections
This page is currently about kube-dns and is a bit outdated.
Introduce the heading `# Customizing kube-dns`.
Introduce a separate section about CoreDNS.
* Copyedits, fix headings for customizing DNS
Hey Lubomir,
I coypedited pretty heavily because this workflow is so much easier for docs and because I'm trying to help improve everything touching kubeadm as much as possible.
But there's one outstanding issue wrt headings and intro content: you can't add a heading 1 to a topic to do what you wanted to do. The page title in the front matter is rendered as a heading 1 and everything else has to start at heading 2. (We still need to doc this better in the docs contributing content, I know.)
Instead, I think we need to rewrite the top-of-page intro content to explain better the relationship between kube-dns and CoreDNS. I'm happy to write something, but I thought I'd push this commit first so you can see what I'm doing.
Hope it's all clear -- ping here or on Slack with any questions ~ Jennifer
* Interim fix for talking about CoreDNS
* Fix CoreDNS details
* PSP readOnly hostPath (#8898)
* Add documentation for crictl (#8880)
* Add documentation for crictl
* Copyedit
Signed-off-by: Misty Stanley-Jones <mistyhacks@google.com>
* Final copyedit
* VolumeSubpathEnvExpansion alpha feature (#8835)
* Note that Heapster is deprecated (#8827)
* Note that Heapster is deprecated
This notes that Heapster is deprecated, and migrates the relevant
docs to talk about metrics-server or other solutions by default.
* Copyedits and improvements
Signed-off-by: Misty Stanley-Jones <mistyhacks@google.com>
* Address feedback
* fix shortcode to troubleshoot deploy (#9057)
* update dynamic kubelet config docs for v1.11 (#8766)
* update dynamic kubelet config docs for v1.11
* Substantial copyedit
* Address feedback
* Reference doc for kubeadm (release-1.11) (#9044)
* Reference doc for kubeadm (release-1.11)
* fix shortcode to troubleshoot deploy (#9057)
* Reference doc for kube-components (release-1.11) (#9045)
* Reference doc for kube-components (release-1.11)
* Update cloud-controller-manager.md
* fix shortcode to troubleshoot deploy (#9057)
* Documentation on lowercasing kubeadm init apiserver SANs (#9059)
* Documentation on lowercasing kubeadm init apiserver SANs
* fix shortcode to troubleshoot deploy (#9057)
* Clarification in dynamic Kubelet config doc (#9061)
* Promote sysctls to Beta (#8804)
* Promote sysctls to Beta
* Copyedits
Signed-off-by: Misty Stanley-Jones <mistyhacks@google.com>
* Review comments
* Address feedback
* More feedback
* kubectl reference docs for 1.11 (#9080)
* Update Kubernetes API 1.11 ref docs (#8977)
* Update v1alpha1 to v1beta1.
* Adjust left nav for 1.11 ref docs.
* Trim list of old ref docs.
* Update Federation API ref docs for 1.11. (#9064)
* Update Federation API ref docs for 1.11.
* Add titles.
* Update definitions.html
* CRD versioning Public Documentation (#8834)
* CRD versioning Public Documentation
* Copyedit
Signed-off-by: Misty Stanley-Jones <mistyhacks@google.com>
* Address feedback
* More rewrites
* Address feedback
* Update main CRD page in light of versioning
* Reorg CRD docs
* Further reorg
* Tweak title
* CSI documentation update for raw block volume support (#8927)
* CSI documetation update for raw block volume support
* minor edits for "CSI raw block volume support"
Some small grammar and style nits.
* minor CSIBlockVolume edits
* Update kubectl component ref page for 1.11. (#9094)
* Update kubectl component ref page for 1.11.
* Add title. Replace stevepe with username.
* crd versioning doc: fix nits (#9142)
* Update `DynamicKubeletConfig` feature to beta (#9110)
xref: kubernetes/kubernetes#64275
* Documentation for dynamic volume limits based on node type (#8871)
* add cos for storage limits
* Update docs specific for aws and gce
* fix some minor things
* Update storage-limits.md
* Add k8s version to feature-state shortcode
* The Doc update for ScheduleDaemonSetPods (#8842)
Signed-off-by: Da K. Ma <klaus1982.cn@gmail.com>
* Update docs related to PersistentVolumeLabel admission control (#9109)
The said admission controller is disabled by default in 1.11
(kubernetes/kubernetes#64326) and scheduled to be removed in future
release.
* client exec auth: updates for 1.11 (#9154)
* Updates HA kubeadm docs (#9066)
* Updates HA kubeadm docs
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* kubeadm HA - Add stacked control plane steps
* ssh instructions and some typos in the bash scripts
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* Fix typos and copypasta errors
* Fix rebase issues
* Integrate more changes
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* copyedits, layout and formatting fixes
* final copyedits
* Adds a sanity check for load balancer connection
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* formatting fixes, copyedits
* fix typos, formatting
* Document the Pod Ready++ feature (#9180)
Closes: #9107
Xref: kubernetes/kubernetes#64057
* Mention 'KubeletPluginsWatcher' feature (#9177)
* Mention 'KubeletPluginsWatcher' feature
This feature is more developers oriented than users oriented, so simply
mention it in the feature gate should be fine.
In future, when the design doc is migrated from Google doc to the
kubernetes/community repo, we can add links to it for users who want to
dig deeper.
Closes: #9108
Xref: kubernetes/kubernetes#63328, kubernetes/kubernetes#64605
* Copyedit
* Amend dynamic volume list docs (#9181)
The dynamic volume list feature has been documented but the feature gate
related was not there yet.
Closes: #9105
* Document for service account projection (#9182)
This adds docs for the service account projection feature.
Xref: kubernetes/kubernetes#63819, kubernetes/community#1973
Closes: #9102
* Update pod priority and preemption user docs (#9172)
* Update pod priority and preemption user docs
* Copyedit
* Documentation on setting node name with Kubeadm (#8925)
* Documentation on setting node name with Kubeadm
* copyedit
* Add kubeadm upgrade docs for 1.11 (#9089)
* Add kubeadm upgrade docs for 1.11
* Initial docs review feedback
* Add 1-11 to outline
* Fix formatting on tab blocks
* Move file to correct location
* Add `kubeadm upgrade node config` step
* Overzealous ediffing
* copyedit, fix lists and headings
* clarify --force flag for fixing bad state
* Get TOML ready for 1.11 release
* Blog post for 1.11 release (#9254)
* Blog post for 1.11 release
* Update 2018-06-26-kubernetes-1.11-release-announcement.md
* Update 2018-06-26-kubernetes-1.11-release-announcement.md
* Update 2018-06-26-kubernetes-1.11-release-announcement.md
2018-06-27 22:26:18 +00:00
This is **expected** and part of the design. kubeadm is network provider-agnostic, so the admin
should [install the pod network solution ](/docs/concepts/cluster-administration/addons/ )
of choice. You have to install a Pod Network
before CoreDNS may deployed fully. Hence the `Pending` state before the network is set up.
2017-10-28 17:11:58 +00:00
#### `HostPort` services do not work
The `HostPort` and `HostIP` functionality is available depending on your Pod Network
provider. Please contact the author of the Pod Network solution to find out whether
2018-06-12 15:13:27 +00:00
`HostPort` and `HostIP` functionality are available.
2017-10-28 17:11:58 +00:00
2018-06-12 15:13:27 +00:00
Calico, Canal, and Flannel CNI providers are verified to support HostPort.
2017-10-28 17:11:58 +00:00
2018-06-12 15:13:27 +00:00
For more information, see the [CNI portmap documentation ](https://github.com/containernetworking/plugins/blob/master/plugins/meta/portmap/README.md ).
2017-10-28 17:11:58 +00:00
If your network provider does not support the portmap CNI plugin, you may need to use the [NodePort feature of
services](/docs/concepts/services-networking/service/#type-nodeport) or use `HostNetwork=true` .
#### Pods are not accessible via their Service IP
2018-06-12 15:13:27 +00:00
- Many network add-ons do not yet enable [hairpin mode ](https://kubernetes.io/docs/tasks/debug-application-cluster/debug-service/#a-pod-cannot-reach-itself-via-service-ip )
which allows pods to access themselves via their Service IP. This is an issue related to
[CNI ](https://github.com/containernetworking/cni/issues/476 ). Please contact the network
add-on provider to get the latest status of their support for hairpin mode.
2017-10-28 17:11:58 +00:00
2018-06-12 15:13:27 +00:00
- If you are using VirtualBox (directly or via Vagrant), you will need to
ensure that `hostname -i` returns a routable IP address. By default the first
interface is connected to a non-routable host-only network. A work around
is to modify `/etc/hosts` , see this [Vagrantfile ](https://github.com/errordeveloper/k8s-playground/blob/22dd39dfc06111235620e6c4404a96ae146f26fd/Vagrantfile#L11 )
for an example.
2017-10-28 17:11:58 +00:00
#### TLS certificate errors
The following error indicates a possible certificate mismatch.
Release docs for Kubernetes 1.11 (#9171)
* Seperate priority and preemption (#8144)
* Doc about PID pressure condition. (#8211)
* Doc about PID pressure condition.
Signed-off-by: Da K. Ma <klaus1982.cn@gmail.com>
* "so" -> "too"
* Update version selector for 1.11
* StorageObjectInUseProtection is GA (#8291)
* Feature gate: StorageObjectInUseProtection is GA
Update feature gate reference for 1.11
* Trivial commit to re-trigger Netlify
* CRIContainerLogRotation is Beta in 1.11 (#8665)
* Seperate priority and preemption (#8144)
* CRIContainerLogRotation is Beta in 1.11
xref: kubernetes/kubernetes#64046
* Bring StorageObjectInUseProtection feature to GA (#8159)
* StorageObjectInUseProtection is GA (#8291)
* Feature gate: StorageObjectInUseProtection is GA
Update feature gate reference for 1.11
* Trivial commit to re-trigger Netlify
* Bring StorageObjectInUseProtection feature to GA
StorageObjectInUseProtection is Beta in K8s 1.10.
It's brought to GA in K8s 1.11.
* Fixed typo and added feature state tags.
* Remove KUBE_API_VERSIONS doc (#8292)
The support to the KUBER_API_VERSIONS environment variable is completely
dropped (no deprecation). This PR removes the related doc in
release-1.11.
xref: kubernetes/kubernetes#63165
* Remove InitialResources from admission controllers (#8293)
The feature (was experimental) is dropped in 1.11.
xref: kubernetes/kubernetes#58784
* Remove docs related to in-tree support to GPU (#8294)
* Remove docs related to in-tree support to GPU
The in-tree support to GPU is completely removed in release 1.11.
This PR removes the related docs in release-1.11 branch.
xref: kubernetes/kubernetes#61498
* Update content updated by PR to Hugo syntax
Signed-off-by: Misty Stanley-Jones <mistyhacks@google.com>
* Update the doc about extra volume in kubeadm config (#8453)
Signed-off-by: Xianglin Gao <xianglin.gxl@alibaba-inc.com>
* Update CRD Subresources for 1.11 (#8519)
* coredns: update notes in administer-cluster/coredns.md (#8697)
CoreDNS is installed by default in 1.11.
Add notes on how to install kube-dns instead.
Update notes about CoreDNS->CoreDNS upgrades as in 1.11
the Corefile is retained.
Add example on upgrading from kube-dns to CoreDNS.
* kubeadm-alpha: CoreDNS related changes (#8727)
Update note about CoreDNS feature gate.
This change also updates a tab as a kubeadm sub-command
will change.
It looks for a new generated file:
generated/kubeadm_alpha_phase_addon_coredns.md
instead of:
generated/kubeadm_alpha_phase_addon_kube-dns.md
* Update cloud controller manager docs to beta 1.11 (#8756)
* Update cloud controller manager docs to beta 1.11
* Use Hugo shortcode for feature state
* kubeadm-upgrade: include new command `kubeadm upgrade diff` (#8617)
Also:
- Include note that this was added in 1.11.
- Modify the note about upgrade guidance.
* independent: update CoreDNS mentions for kubeadm (#8753)
Give CoreDNS instead of kube-dns examples in:
- docs/setup/independent/create-cluster-kubeadm.md
- docs/setup/independent/troubleshooting-kubeadm.md
* update 1.11 --server-print info (#8870)
* update 1.11 --server-print info
* Copyedit
* Mark ExpandPersistentVolumes feature to beta (#8778)
* Update version selector for 1.11
* Mark ExpandPersistentVolumes Beta
xref: kubernetes/kubernetes#64288
* fix shortcode, add placeholder files to fix deploy failures (#8874)
* declare ipvs ga (#8850)
* kubeadm: update info about CoreDNS in kubeadm-init.md (#8728)
Add info to install kube-dns instead of CoreDNS, as CoreDNS
is the default DNS server in 1.11.
Add notes that kubeadm config images can be used to list and pull
the required images in 1.11.
* kubeadm: update implementation-details.md about CoreDNS (#8829)
- Replace examples from kube-dns to CoreDNS
- Add notes about the CoreDNS feature gate status in 1.11
- Add note that the service name for CoreDNS is also
called `kube-dns`
* Update block device support for 1.11 (#8895)
* Update block device support for 1.11
* Copyedits
* Fix typo 'fiber channel' (#8957)
Signed-off-by: Misty Stanley-Jones <mistyhacks@google.com>
* kubeadm-upgrade: add the 'node [config]' sub-command (#8960)
- Add includes for the generated pages
- Include placeholder generated pages
* kubeadm-init: update the example for the MasterConfiguration (#8958)
- include godocs link for MasterConfiguration
- include example MasterConfiguration
- add note that `kubeadm config print-default` can be used
* kubeadm-config: include new commands (#8862)
Add notes and includes for these new commands in 1.11:
- kubeadm config print-default
- kubeadm config migrate
- kubeadm config images list
- kubeadm config images pull
Include placeholder generated files for the above.
* administer-cluster/coredns: include more changes (#8985)
It was requested that for this page a couple of methods
should be outlined:
- manual installation for CoreDNS explained at the Kubernetes
section of the GitHub project for CoreDNS
- installation and upgrade via kubeadm
Make the above changes and also add a section "About CoreDNS".
This commit also lowercases a section title.
* Update CRD subresources doc for 1.11 (#8918)
* Add docs for volume expansion and online resizing (#8896)
* Add docs for volume expansion going beta
* Copyedit
* Address feedback
* Update exec plugin docs with TLS credentials (#8826)
* Update exec plugin docs with TLS credentials
kubernetes/kubernetes#61803 implements TLS client credential support for
1.11.
* Copyedit
* More copyedits for clarification
* Additional copyedit
* Change token->credential
* NodeRestriction admission prevents kubelet taint removal (#8911)
* dns-custom-namerserver: break down the page into mutliple sections (#8900)
* dns-custom-namerserver: break down the page into mutliple sections
This page is currently about kube-dns and is a bit outdated.
Introduce the heading `# Customizing kube-dns`.
Introduce a separate section about CoreDNS.
* Copyedits, fix headings for customizing DNS
Hey Lubomir,
I coypedited pretty heavily because this workflow is so much easier for docs and because I'm trying to help improve everything touching kubeadm as much as possible.
But there's one outstanding issue wrt headings and intro content: you can't add a heading 1 to a topic to do what you wanted to do. The page title in the front matter is rendered as a heading 1 and everything else has to start at heading 2. (We still need to doc this better in the docs contributing content, I know.)
Instead, I think we need to rewrite the top-of-page intro content to explain better the relationship between kube-dns and CoreDNS. I'm happy to write something, but I thought I'd push this commit first so you can see what I'm doing.
Hope it's all clear -- ping here or on Slack with any questions ~ Jennifer
* Interim fix for talking about CoreDNS
* Fix CoreDNS details
* PSP readOnly hostPath (#8898)
* Add documentation for crictl (#8880)
* Add documentation for crictl
* Copyedit
Signed-off-by: Misty Stanley-Jones <mistyhacks@google.com>
* Final copyedit
* VolumeSubpathEnvExpansion alpha feature (#8835)
* Note that Heapster is deprecated (#8827)
* Note that Heapster is deprecated
This notes that Heapster is deprecated, and migrates the relevant
docs to talk about metrics-server or other solutions by default.
* Copyedits and improvements
Signed-off-by: Misty Stanley-Jones <mistyhacks@google.com>
* Address feedback
* fix shortcode to troubleshoot deploy (#9057)
* update dynamic kubelet config docs for v1.11 (#8766)
* update dynamic kubelet config docs for v1.11
* Substantial copyedit
* Address feedback
* Reference doc for kubeadm (release-1.11) (#9044)
* Reference doc for kubeadm (release-1.11)
* fix shortcode to troubleshoot deploy (#9057)
* Reference doc for kube-components (release-1.11) (#9045)
* Reference doc for kube-components (release-1.11)
* Update cloud-controller-manager.md
* fix shortcode to troubleshoot deploy (#9057)
* Documentation on lowercasing kubeadm init apiserver SANs (#9059)
* Documentation on lowercasing kubeadm init apiserver SANs
* fix shortcode to troubleshoot deploy (#9057)
* Clarification in dynamic Kubelet config doc (#9061)
* Promote sysctls to Beta (#8804)
* Promote sysctls to Beta
* Copyedits
Signed-off-by: Misty Stanley-Jones <mistyhacks@google.com>
* Review comments
* Address feedback
* More feedback
* kubectl reference docs for 1.11 (#9080)
* Update Kubernetes API 1.11 ref docs (#8977)
* Update v1alpha1 to v1beta1.
* Adjust left nav for 1.11 ref docs.
* Trim list of old ref docs.
* Update Federation API ref docs for 1.11. (#9064)
* Update Federation API ref docs for 1.11.
* Add titles.
* Update definitions.html
* CRD versioning Public Documentation (#8834)
* CRD versioning Public Documentation
* Copyedit
Signed-off-by: Misty Stanley-Jones <mistyhacks@google.com>
* Address feedback
* More rewrites
* Address feedback
* Update main CRD page in light of versioning
* Reorg CRD docs
* Further reorg
* Tweak title
* CSI documentation update for raw block volume support (#8927)
* CSI documetation update for raw block volume support
* minor edits for "CSI raw block volume support"
Some small grammar and style nits.
* minor CSIBlockVolume edits
* Update kubectl component ref page for 1.11. (#9094)
* Update kubectl component ref page for 1.11.
* Add title. Replace stevepe with username.
* crd versioning doc: fix nits (#9142)
* Update `DynamicKubeletConfig` feature to beta (#9110)
xref: kubernetes/kubernetes#64275
* Documentation for dynamic volume limits based on node type (#8871)
* add cos for storage limits
* Update docs specific for aws and gce
* fix some minor things
* Update storage-limits.md
* Add k8s version to feature-state shortcode
* The Doc update for ScheduleDaemonSetPods (#8842)
Signed-off-by: Da K. Ma <klaus1982.cn@gmail.com>
* Update docs related to PersistentVolumeLabel admission control (#9109)
The said admission controller is disabled by default in 1.11
(kubernetes/kubernetes#64326) and scheduled to be removed in future
release.
* client exec auth: updates for 1.11 (#9154)
* Updates HA kubeadm docs (#9066)
* Updates HA kubeadm docs
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* kubeadm HA - Add stacked control plane steps
* ssh instructions and some typos in the bash scripts
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* Fix typos and copypasta errors
* Fix rebase issues
* Integrate more changes
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* copyedits, layout and formatting fixes
* final copyedits
* Adds a sanity check for load balancer connection
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
* formatting fixes, copyedits
* fix typos, formatting
* Document the Pod Ready++ feature (#9180)
Closes: #9107
Xref: kubernetes/kubernetes#64057
* Mention 'KubeletPluginsWatcher' feature (#9177)
* Mention 'KubeletPluginsWatcher' feature
This feature is more developers oriented than users oriented, so simply
mention it in the feature gate should be fine.
In future, when the design doc is migrated from Google doc to the
kubernetes/community repo, we can add links to it for users who want to
dig deeper.
Closes: #9108
Xref: kubernetes/kubernetes#63328, kubernetes/kubernetes#64605
* Copyedit
* Amend dynamic volume list docs (#9181)
The dynamic volume list feature has been documented but the feature gate
related was not there yet.
Closes: #9105
* Document for service account projection (#9182)
This adds docs for the service account projection feature.
Xref: kubernetes/kubernetes#63819, kubernetes/community#1973
Closes: #9102
* Update pod priority and preemption user docs (#9172)
* Update pod priority and preemption user docs
* Copyedit
* Documentation on setting node name with Kubeadm (#8925)
* Documentation on setting node name with Kubeadm
* copyedit
* Add kubeadm upgrade docs for 1.11 (#9089)
* Add kubeadm upgrade docs for 1.11
* Initial docs review feedback
* Add 1-11 to outline
* Fix formatting on tab blocks
* Move file to correct location
* Add `kubeadm upgrade node config` step
* Overzealous ediffing
* copyedit, fix lists and headings
* clarify --force flag for fixing bad state
* Get TOML ready for 1.11 release
* Blog post for 1.11 release (#9254)
* Blog post for 1.11 release
* Update 2018-06-26-kubernetes-1.11-release-announcement.md
* Update 2018-06-26-kubernetes-1.11-release-announcement.md
* Update 2018-06-26-kubernetes-1.11-release-announcement.md
2018-06-27 22:26:18 +00:00
```none
2018-06-12 15:13:27 +00:00
# kubectl get pods
2017-10-28 17:11:58 +00:00
Unable to connect to the server: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "kubernetes")
```
2018-06-12 15:13:27 +00:00
- Verify that the `$HOME/.kube/config` file contains a valid certificate, and
regenerate a certificate if necessary. The certificates in a kubeconfig file
are base64 encoded. The `base64 -d` command can be used to decode the certificate
and `openssl x509 -text -noout` can be used for viewing the certificate information.
- Another workaround is to overwrite the existing `kubeconfig` for the "admin" user:
2017-10-28 17:11:58 +00:00
2018-06-12 15:13:27 +00:00
```sh
mv $HOME/.kube $HOME/.kube.bak
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
```
2017-10-28 17:11:58 +00:00
2018-06-12 15:13:27 +00:00
#### Default NIC When using flannel as the pod network in Vagrant
2018-01-07 23:21:40 +00:00
2018-01-07 23:29:11 +00:00
The following error might indicate that something was wrong in the pod network:
2018-01-07 23:21:40 +00:00
2018-06-12 15:13:27 +00:00
```sh
2018-01-07 23:21:40 +00:00
Error from server (NotFound): the server could not find the requested resource
```
2018-06-12 15:13:27 +00:00
- If you're using flannel as the pod network inside Vagrant, then you will have to specify the default interface name for flannel.
2018-01-07 23:21:40 +00:00
2018-06-12 15:13:27 +00:00
Vagrant typically assigns two interfaces to all VMs. The first, for which all hosts are assigned the IP address `10.0.2.15` , is for external traffic that gets NATed.
2018-01-07 23:21:40 +00:00
2018-06-12 15:13:27 +00:00
This may lead to problems with flannel, which defaults to the first interface on a host. This leads to all hosts thinking they have the same public IP address. To prevent this, pass the `--iface eth1` flag to flannel so that the second interface is chosen.
2018-03-03 20:13:54 +00:00
2018-06-12 15:13:27 +00:00
#### Non-public IP used for containers
2018-03-03 20:13:54 +00:00
2018-06-12 15:13:27 +00:00
In some situations `kubectl logs` and `kubectl run` commands may return with the following errors in an otherwise functional cluster:
2018-03-03 20:13:54 +00:00
2018-06-12 15:13:27 +00:00
```sh
2018-03-03 20:13:54 +00:00
Error from server: Get https://10.19.0.41:10250/containerLogs/default/mysql-ddc65b868-glc5m/mysql: dial tcp 10.19.0.41:10250: getsockopt: no route to host
```
2018-06-12 15:13:27 +00:00
- This may be due to Kubernetes using an IP that can not communicate with other IPs on the seemingly same subnet, possibly by policy of the machine provider.
- Digital Ocean assigns a public IP to `eth0` as well as a private one to be used internally as anchor for their floating IP feature, yet `kubelet` will pick the latter as the node's `InternalIP` instead of the public one.
2018-03-03 20:13:54 +00:00
2018-06-12 15:13:27 +00:00
Use `ip addr show` to check for this scenario instead of `ifconfig` because `ifconfig` will not display the offending alias IP address. Alternatively an API endpoint specific to Digital Ocean allows to query for the anchor IP from the droplet:
2018-03-03 20:13:54 +00:00
2018-06-12 15:13:27 +00:00
```sh
curl http://169.254.169.254/metadata/v1/interfaces/public/0/anchor_ipv4/address
```
2018-03-03 20:13:54 +00:00
2018-06-12 15:13:27 +00:00
The workaround is to tell `kubelet` which IP to use using `--node-ip` . When using Digital Ocean, it can be the public one (assigned to `eth0` ) or the private one (assigned to `eth1` ) should you want to use the optional private network. The [KubeletExtraArgs section of the MasterConfiguration file ](https://github.com/kubernetes/kubernetes/blob/master/cmd/kubeadm/app/apis/kubeadm/v1alpha2/types.go#L147 ) can be used for this.
2018-03-03 20:13:54 +00:00
2018-06-12 15:13:27 +00:00
Then restart `kubelet` :
2018-03-03 20:13:54 +00:00
2018-06-12 15:13:27 +00:00
```sh
systemctl daemon-reload
systemctl restart kubelet
```
2018-03-03 20:13:54 +00:00
2018-06-12 15:13:27 +00:00
#### Services with externalTrafficPolicy=Local are not reachable
2018-06-14 04:33:28 +00:00
On nodes where the hostname for the kubelet is overridden using the `--hostname-override` option, kube-proxy will default to treating 127.0.0.1 as the node IP, which results in rejecting connections for Services configured for `externalTrafficPolicy=Local` . This situation can be verified by checking the output of `kubectl -n kube-system logs <kube-proxy pod name>` :
2018-06-12 15:13:27 +00:00
```sh
W0507 22:33:10.372369 1 server.go:586] Failed to retrieve node info: nodes "ip-10-0-23-78" not found
W0507 22:33:10.372474 1 proxier.go:463] invalid nodeIP, initializing kube-proxy with 127.0.0.1 as nodeIP
```
A workaround for this is to modify the kube-proxy DaemonSet in the following way:
```sh
kubectl -n kube-system patch --type json daemonset kube-proxy -p "$(cat < < 'EOF'
[
{
"op": "add",
"path": "/spec/template/spec/containers/0/env",
"value": [
{
"name": "NODE_NAME",
"valueFrom": {
"fieldRef": {
"apiVersion": "v1",
"fieldPath": "spec.nodeName"
}
}
}
]
},
{
"op": "add",
"path": "/spec/template/spec/containers/0/command/-",
"value": "--hostname-override=${NODE_NAME}"
}
]
EOF
)"
2018-03-03 20:13:54 +00:00
```