Commit Graph

320 Commits (750881c0ab62a9f59d53582bc33826caa167aa83)

Author SHA1 Message Date
x1957 5e09714076 fixtypo seperated -> separated 2017-05-20 20:16:20 +08:00
Michael Taufen 2ee2ec5e21 Remove the deprecated --babysit-daemons kubelet flag 2017-05-17 09:08:57 -07:00
Michael Taufen 93f392251c Mark kubelet's master-service-namespace flag deprecated
This flag is already deprecated in the API server:
- https://kubernetes.io/docs/admin/kube-apiserver/
- https://kubernetes.io/docs/admin/federation-apiserver/
2017-05-12 06:37:48 -07:00
Yu-Ju Hong daa329c9ae Remove the deprecated `--enable-cri` flag
Except for rkt, CRI is the default and only integration point for
container runtimes.
2017-05-10 13:03:41 -07:00
Kubernetes Submit Queue 77b2e6302c Merge pull request #45236 from verb/sharedpid-2-default
Automatic merge from submit-queue

Enable shared PID namespace by default for docker pods

**What this PR does / why we need it**: This PR enables PID namespace sharing for docker pods by default, bringing the behavior of docker in line with the other CRI runtimes when used with docker >= 1.13.1.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: ref #1615

**Special notes for your reviewer**: cc @dchen1107 @yujuhong 

**Release note**:

```release-note
Kubernetes now shares a single PID namespace among all containers in a pod when running with docker >= 1.13.1. This means processes can now signal processes in other containers in a pod, but it also means that the `kubectl exec {pod} kill 1` pattern will cause the pod to be restarted rather than a single container.
```
2017-05-10 12:06:01 -07:00
wlan0 45d2bc06b7 cloud initialize node in external cloud controller 2017-05-05 16:51:45 -07:00
Lee Verberne b668371a63 Enable shared PID namespace by default for docker 2017-05-03 17:12:08 +00:00
Klaus Ma e0d67c9913 Removed duplicated 'default' in kubelet's help message. 2017-04-30 04:18:09 -04:00
Kubernetes Submit Queue 55f802b72a Merge pull request #44196 from xiangpengzhao/cmd-cleanup
Automatic merge from submit-queue

Delete "hard-coded" default value in flags usage.

**What this PR does / why we need it**:
Some flags of kubernetes components have "hard-coded" default values in their usage info. In fact, [pflag pkg](https://github.com/kubernetes/kubernetes/blob/master/vendor/github.com/spf13/pflag/flag.go#L602-L608) has already added a string `(default value)` automatically in the usage info if the flag is initialized. Then we don't need to hard-code the default value in usage info. After this PR, if we want to update the default value of a flag, we only need to update the flag where it is initialized. `pflag` will update the usage info for us. This will avoid inconsistency.

For example:
Before
```
kubelet -h
...
--node-status-update-frequency duration                   Specifies how often kubelet posts node status to master. Note: be cautious when changing the constant, it must work with nodeMonitorGracePeriod in nodecontroller. Default: 10s (default 10s)
...
```

After
```
kubelet -h
...
--node-status-update-frequency duration                   Specifies how often kubelet posts node status to master. Note: be cautious when changing the constant, it must work with nodeMonitorGracePeriod in nodecontroller. (default 10s)
...
```

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:
This PR doesn't delete some "hard-coded" default values because they are not explicitly initialized. We still need to hard-code them to give users friendly info.

```
--allow-privileged                                        If true, allow containers to request privileged mode. [default=false]
```

**Release note**:

```release-note
None
```
2017-04-28 21:28:09 -07:00
Lee Verberne d22dd0fa35 Implement shared PID namespace in the dockershim 2017-04-27 23:43:53 +00:00
Kubernetes Submit Queue 099e7a5f0a Merge pull request #44162 from liggitt/tls-flag-help
Automatic merge from submit-queue (batch tested with PRs 40060, 44860, 44865, 44825, 44162)

Clarify kubelet cert flag usage
2017-04-24 23:07:45 -07:00
Andy Goldstein 00e11566f2 Make the dockershim root directory configurable
Make the dockershim root directory configurable so things like
integration tests (e.g. in OpenShift) can run as non-root.
2017-04-12 09:06:21 -04:00
Random-Liu 327fc270d7 Add dockershim only mode 2017-04-07 16:43:57 -07:00
xiangpengzhao 420caf200c
Delete "hard-coded" default value in flags usage. 2017-04-07 11:21:37 +08:00
Jordan Liggitt 13e583141a
Clarify kubelet cert flag usage 2017-04-06 10:57:37 -04:00
Michael Taufen f5eed7e91d Add a separate flags struct for Kubelet flags
Kubelet flags are not necessarily appropriate for the KubeletConfiguration
object. For example, this PR also removes HostnameOverride and NodeIP
from KubeletConfiguration. This is a preleminary step to enabling Nodes
to share configurations, as part of the dynamic Kubelet configuration
feature (#29459). Fields that must be unique for each node inhibit
sharing, because their values, by definition, cannot be shared.
2017-04-03 13:28:29 -07:00
Kubernetes Submit Queue 6f3e5bade6 Merge pull request #40432 from sjenning/imagegc-default
Automatic merge from submit-queue

kubelet: change image-gc-high-threshold below docker dm.min_free_space

docker dm.min_free_space defaults to 10%, which "specifies the min free space percent in a thin pool require for new device creation to succeed....Whenever a new a thin pool device is created (during docker pull or during container creation), the Engine checks if the minimum free space is available. If sufficient space is unavailable, then device creation fails and any relevant docker operation fails." [1]

This setting is preventing the storage usage to cross the 90% limit. However, image GC is expected to kick in only beyond image-gc-high-threshold. The image-gc-high-threshold has a default value of 90%, and hence GC never triggers. If image-gc-high-threshold is set to a value lower than (100 - dm.min_free_space)%, GC triggers.

xref https://bugzilla.redhat.com/show_bug.cgi?id=1408309

```release-note
changed kubelet default image-gc-high-threshold to 85% to resolve a conflict with default settings in docker that prevented image garbage collection from resolving low disk space situations when using devicemapper storage.
```

@derekwaynecarr @sdodson @rhvgoyal
2017-04-03 10:51:32 -07:00
Kubernetes Submit Queue 2b6e318ea0 Merge pull request #38937 from nak3/reserved-example
Automatic merge from submit-queue

Use realistic value for the memory example of kube-reserved and system-reserved

Use realistic value for the memory example of kube-reserved and system-reserved

Currently, kublet help shows the memory example of
kube-reserved and system-reserved as 150G. This 150G is not realistic
value and it leads misconfiguration or confusion. This patch changes
to example value as 500Mi.

Before(same with system-reserved):
```
      --kube-reserved value                                A set of ResourceName=ResourceQuantity (e.g. cpu=200m,memory=150G) pairs that describe resources reserved for kubernetes system components. Currently only cpu and memory are supported. See http://releases.k8s.io/HEAD/docs/user-guide/compute-resources.md for more detail. [default=none]
```

After(same with system-reserved):
```
      --kube-reserved value                                A set of ResourceName=ResourceQuantity (e.g. cpu=200m,memory=500Mi) pairs that describe resources reserved for kubernetes system components. Currently only cpu and memory are supported. See http://releases.k8s.io/HEAD/docs/user-guide/compute-resources.md for more detail. [default=none]
```
2017-03-21 16:39:19 -07:00
Andy Goldstein b011529d8a Add pprof trace support
Add pprof trace support and --enable-contention-profiling to those
components that don't already have it.
2017-03-07 10:10:42 -05:00
Kenjiro Nakayama fd8099c179 Use realistic value for the memory example of kube-reserved and system-reserved 2017-03-04 14:06:09 +09:00
Kubernetes Submit Queue b432e137e6 Merge pull request #42350 from vishh/enable-qos-cgroups
Automatic merge from submit-queue (batch tested with PRs 41919, 41149, 42350, 42351, 42285)

enable cgroups tiers and node allocatable enforcement on pods by default.

```release-note
Pods are launched in a separate cgroup hierarchy than system services.
```
Depends on #41753

cc @derekwaynecarr
2017-03-03 16:44:41 -08:00
Seth Jennings cc50aa9dfb kubelet: enable qos-level memory request reservation 2017-03-02 15:04:13 -06:00
Vishnu kannan 17a6d2da72 enable cgroups tiers by default.
enable node allocatable enforcement on pods by default.

Signed-off-by: Vishnu kannan <vishnuk@google.com>
2017-03-01 11:42:42 -08:00
Vishnu kannan 69acb02394 use feature gate instead of flag to control support for GPUs
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2017-02-28 13:42:07 -08:00
Vishnu kannan 3b0a408e3b improve gpu integration
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2017-02-28 11:27:53 -08:00
Hui-Zhi 57c77ffbdd Add support for multiple nvidia gpus 2017-02-28 11:24:48 -08:00
Vishnu Kannan cc5f5474d5 add support for node allocatable phase 2 to kubelet
Signed-off-by: Vishnu Kannan <vishnuk@google.com>
2017-02-27 21:24:44 -08:00
Vishnu Kannan 70e340b045 adding kubelet flags for node allocatable phase 2
Signed-off-by: Vishnu Kannan <vishnuk@google.com>
2017-02-27 21:24:44 -08:00
Kubernetes Submit Queue 15ca928a9d Merge pull request #41941 from dashpole/deprecation
Automatic merge from submit-queue (batch tested with PRs 41621, 41946, 41941, 41250, 41729)

Deprecate outofdisk-transition-frequency and low-diskspace-threshold-mb flags

This is a prerequisite for #41654.

See the [kubelet eviction docs](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/kubelet-eviction.md#deprecation-of-existing-features) for more information.

cc @vishh
2017-02-26 06:46:59 -08:00
David Ashpole 32ea24bc65 deprecate outofdisktransitionfrequency and lowdiskspacethresholdmb 2017-02-22 16:10:31 -08:00
Harry Zhang 6bceee852b Update description of kubelet 2017-02-22 10:12:11 +08:00
Kubernetes Submit Queue 3bc575c91f Merge pull request #33550 from rtreffer/kubelet-allow-multiple-dns-server
Automatic merge from submit-queue

Allow multipe DNS servers as comma-seperated argument for kubelet --dns

This PR explores how kubectls "--dns" could be extended to specify multiple DNS servers for in-cluster PODs. Testing on the local libvirt-coreos cluster shows that multiple DNS server are injected without issues.

Specifying multiple DNS servers increases resilience against
- Packet drops
- Single server failure

I am debugging services that do 50+ DNS requests for a single incoming interactive request, thus highly increase the chance of a slowdown (+5s) due to a single packet drop. Switching to two DNS servers will reduce the impact of the issues (roughly +1s on glibc, 0s on musl, error-rate goes down to error-rate^2).

Note that there is no need to change any runtime related code as far as I know. In the case of "default" dns the /etc/resolv.conf is parsed and multiple DNS server are send to the backend anyway. This only adds the same capability for the clusterFirst case.

I've heard from @thockin that multiple DNS entries are somehow considered. I've no idea what was considered, though. This is what I would like to see for our production use, though.

```release-note
NONE
```
2017-02-15 12:45:32 -08:00
Kubernetes Submit Queue 1ad5cea24e Merge pull request #41261 from ncdc/shared-informers-07-resourcequota
Automatic merge from submit-queue

Switch resourcequota controller to shared informers

Originally part of #40097 

I have had some issues with this change in the past, when I updated `pkg/quota` to use the new informers while `pkg/controller/resourcequota` remained on the old informers. In this PR, both are switched to using the new informers. The issues in the past were lots of flakey test failures in the ResourceQuota e2es, where it would randomly fail to see deletions and handle replenishment. I am hoping that now that everything here is consistently using the new informers, there won't be any more of these flakes, but it's something to keep an eye out for.

I also think `pkg/controller/resourcequota` could be cleaned up. I don't think there's really any need for `replenishment_controller.go` any more since it's no longer running individual controllers per kind to replenish. It instead just uses the shared informer and adds event handlers to it. But maybe we do that in a follow up.

cc @derekwaynecarr @smarterclayton @wojtek-t @deads2k @sttts @liggitt @timothysc @kubernetes/sig-scalability-pr-reviews
2017-02-15 11:37:04 -08:00
Yu-Ju Hong fb94f441ce Set EnableCRI to true by default
This change makes kubelet to use the CRI implementation by default,
unless the users opt out explicitly by using --enable-cri=false.
For the rkt integration, the --enable-cri flag will have no effect
since rktnetes does not use CRI.

Also, mark the original --experimental-cri flag hidden and deprecated,
so that we can remove it in the next release.
2017-02-14 16:15:51 -08:00
Andy Goldstein d820e3928c Switch resourcequota controller to shared informers 2017-02-14 12:20:27 -05:00
Michael Taufen cf6d51a3ee Remove deprecated --system-container flag 2017-02-07 14:32:38 -08:00
Michael Taufen 7f5ce68d61 Remove deprecated --resource-container flag 2017-02-07 14:32:37 -08:00
Michael Taufen 2f6027a092 Remove deprecated --auth-path flag 2017-02-07 14:32:37 -08:00
Michael Taufen bec6635ccc Remove deprecated --config flag 2017-02-07 14:32:37 -08:00
Derek Carr 04a909a257 Rename cgroups-per-qos flag to not be experimental 2017-02-03 17:10:53 -05:00
Rene Treffer 42ff859c27 Allow multipe DNS servers as comma-seperated argument for --dns
Depending on an exact cluster setup multiple dns may make sense.
Comma-seperated lists of DNS server are quite common as DNS servers
are always plain IPs.
2017-02-01 22:38:40 +01:00
Seth Jennings 0247a9acac kubelet: change image-gc-threshold below docker dm.min_free_space 2017-01-25 11:26:40 -06:00
Dr. Stefan Schimanski 82826ec273 pkg/util/flag: move to k8s.io/apiserver 2017-01-24 20:56:03 +01:00
Dr. Stefan Schimanski a6b2ebb50c pkg/flag: make feature gate extensible and split between generic and kube 2017-01-24 20:56:03 +01:00
Dr. Stefan Schimanski 56d60cfae6 pkg/util: move flags from pkg/util/config to pkg/util/flags 2017-01-24 20:56:03 +01:00
Kubernetes Submit Queue ee986696c8 Merge pull request #40171 from yujuhong/deprecate_nsenter_exec
Automatic merge from submit-queue (batch tested with PRs 40251, 40171)

Mark --docker-exec-handler deprecated

We plan to drop support for the nsenter exec handler in the future. Marking this flag as deprecated to warn the users.
2017-01-23 11:24:09 -08:00
Yu-Ju Hong d4364e76da Mark --docker-exec-handler deprecated 2017-01-20 10:30:05 -08:00
Seth Jennings e2750a305a reclaim terminated pod volumes 2017-01-20 11:08:35 -06:00
Lucas Käldström d54cdc3eab
Remove the deprecated --reconcile-cidr flag from kubelet 2016-12-30 18:26:53 +02:00
Jun Gong 036899ec98 Add --image-pull-progress-deadline option to kubelet 2016-12-09 09:28:57 +08:00
Derek Carr 5b2d1c2c25 Enable kernel memcg notification via additional flag 2016-12-07 10:09:41 -05:00
Mike Danese e225625a80 add a configuration for kubelet to register as a node with taints
and deprecate register-schedulable
2016-12-06 10:32:54 -08:00
Vishnu kannan 9066253491 [kubelet] rename --cgroups-per-qos to --experimental-cgroups-per-qos to reflect the true nature of that feature
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-11-14 14:06:39 -08:00
Rajat Ramesh Koujalagi d81e216fc6 Better messaging for missing volume components on host to perform mount 2016-11-09 15:16:11 -08:00
Kubernetes Submit Queue c41c603baa Merge pull request #36471 from Random-Liu/fix-flag-description
Automatic merge from submit-queue

Kubelet: Fix the description of MaxContainers kubelet flag.

Found this during code review.

The default number has been changed to `-1` and `1`. 82c488bd6e/pkg/apis/componentconfig/v1alpha1/defaults.go (L279-L285)
@yujuhong 

/cc @saad-ali This PR fixed incorrect doc.
2016-11-09 03:13:51 -08:00
Random-Liu 021ff77028 Fix the description of MaxContainers kubelet flag. 2016-11-08 17:52:40 -08:00
Vishnu kannan dd8ec911f3 Revert "Revert "Merge pull request #35821 from vishh/gci-mounter-scope""
This reverts commit 402116aed4.
2016-11-08 11:09:10 -08:00
Michael Taufen 0c6c622434 Fail kubelet creation if swap enabled
Provides an opt-in flag, --experimental-fail-swap-on (and corresponding
KubeletConfiguration value, ExperimentalFailSwapOn), which is false by default.
2016-11-08 08:39:31 -08:00
Yu-Ju Hong dcce768a3e Rename experimental-runtime-integration-type to experimental-cri 2016-11-07 11:29:24 -08:00
saadali 402116aed4 Revert "Merge pull request #35821 from vishh/gci-mounter-scope"
This reverts commit 973fa6b334, reversing
changes made to 41b5fe86b6.
2016-11-03 20:23:25 -07:00
Vishnu Kannan 414e4ae549 Revert "Adding a root filesystem override for kubelet mounter"
This reverts commit e861a5761d.
2016-11-02 15:18:09 -07:00
Michael Taufen a38566dac6 Add FeatureGates field to KubeletConfiguration 2016-11-01 14:53:50 -07:00
Vishnu kannan e861a5761d Adding a root filesystem override for kubelet mounter
This is useful for supporting hostPath volumes via containerized
mounters in kubelet.

Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-10-26 21:42:59 -07:00
Kubernetes Submit Queue 10061ac358 Merge pull request #35523 from luxas/remove_reconcile
Automatic merge from submit-queue

Deprecate the --reconcile-cidr flag

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

**What this PR does / why we need it**: Follows up https://github.com/kubernetes/kubernetes/pull/34906

**Special notes for your reviewer**: I'm not sure why coreos had set `--reconcile-cidr` to `false` and what the implications are now.

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
Deprecate the --reconcile-cidr kubelet flag because it has no function anymore
```

PTAL @thockin @freehan @justinsb @yujuhong 
@kubernetes/sig-node @kubernetes/sig-network 

**I will add `hack/update-all.sh` contents soon to fix builds**
2016-10-26 20:18:37 -07:00
Vishnu kannan adef4675a0 rename kubelet flag mounter-path to experimental-mounter-path
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-10-26 14:50:33 -07:00
Lucas Käldström 1cf00d1ff1 Remove the function of --reconcile-cidr and deprecate it 2016-10-26 20:25:35 +03:00
Kubernetes Submit Queue a898f3d996 Merge pull request #34381 from liggitt/kubelet-auth
Automatic merge from submit-queue

kubelet authn/authz

Implements https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/kubelet-auth.md

Part of [Authenticated/Authorized access to kubelet API](https://github.com/kubernetes/features/issues/89) feature
2016-10-25 17:40:27 -07:00
Random-Liu 3d549b9e25 Add dockershim grpc server. 2016-10-25 10:31:16 -07:00
Jordan Liggitt 426caf5bd1
Kubelet auth flags 2016-10-25 03:40:08 -04:00
Jing Xu 34ef93aa0c Add mounterPath to mounter interface
In order to be able to use new mounter library, this PR adds the
mounterPath flag to kubelet which passes the flag to the mount
interface. If flag is empty, mount uses default mount path.
2016-10-20 14:15:27 -07:00
Kubernetes Submit Queue 61e0113019 Merge pull request #34906 from luxas/remove_old_networking
Automatic merge from submit-queue

WIP: Remove the legacy networking mode

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

**What this PR does / why we need it**:
Removes the deprecated configure-cbr0 flag and networking mode to avoid having untested and maybe unstable code in kubelet, see: #33789

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, #<issue_number>, ...)` format, will close that issue when PR gets merged)*: 
fixes #30589
fixes #31937

**Special notes for your reviewer**: There are a lot of deployments who rely on this networking mode. Not sure how we deal with that: force switch to kubenet or just delete the old deployment?

But please review the code changes first (the first commit)

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
Removed the deprecated kubelet --configure-cbr0 flag, and with that the "classic" networking mode as well
```

PTAL @kubernetes/sig-network @kubernetes/sig-node @mikedanese
2016-10-19 01:03:39 -07:00
Clayton Coleman 957c0955aa
Run defaulting on the scheduler startup 2016-10-18 21:07:35 -04:00
Lucas Käldström 0800df74ab Remove the legacy networking mode --configure-cbr0 2016-10-16 21:26:41 +03:00
Harry Zhang eb81ef6023 Merge string flag into util flag 2016-10-11 23:28:59 -04:00
derekwaynecarr 36eb79b42b Add cgroup driver and cgroups-per-qos flags to kubelet 2016-10-05 13:48:37 -04:00
Lucas Käldström 348717c50a Remove the flannel experimental overlay 2016-10-04 11:53:53 +03:00
Ilya Dmitrichenko abc0a98d25
Replace references to http://releases.k8s.io/HEAD/docs/user-guide/ 2016-10-02 11:44:40 +01:00
Yu-Ju Hong 1c3c1ac514 kubelet: Add a hidden flag to enable docker CRI integration
The new flag, if specified, and if --container-runtime=docker, switches
kubelet to use the new CRI implementation for testing. This is hidden flag
since the feature is still under heavy development and the flag may be changed
in the near future.
2016-09-19 13:09:00 -07:00
Bryan Boreham 4e961e2bf5 Add options to set CNI config and binary directories
Also make clearer the function of --network-plugin-dir when using CNI
2016-09-09 11:43:16 +01:00
Minhan Xia 83ca3504b4 add deprecate message for configure-cbr0 2016-09-02 14:36:07 -07:00
Michael Taufen 7ae1458ab0 Remove the deprecated AuthPath from KubeletServer
It has been deprecated for two releases (1.2 and 1.3).
2016-08-25 10:57:31 -07:00
Michael Taufen f277205f4f Kubelet Refactoring
This refactor removes the legacy KubeletConfig object and adds a new
KubeletDeps object, which contains injected runtime objects and
separates them from static config. It also reduces NewMainKubelet to two
arguments: a KubeletConfiguration and a KubeletDeps.

Some mesos and kubemark code was affected by this change, and has been
modified accordingly.

And a few final notes:

KubeletDeps:
KubeletDeps will be a temporary bin for things we might consider
"injected dependencies", until we have a better dependency injection
story for the Kubelet. We will have to discuss this eventually.

RunOnce:
We will likely not pull new KubeletConfiguration from the API server
when in runonce mode, so it doesn't make sense to make this something
that can be configured centrally. We will leave it as a flag-only option
for now. Additionally, it is increasingly looking like nobody actually uses the
Kubelet's runonce mode anymore, so it may be a candidate for deprecation
and removal.
2016-08-25 10:57:31 -07:00
Dr. Stefan Schimanski e356e52247 Add sysctl whitelist on the node 2016-08-25 13:22:01 +02:00
Minhan Xia c1d3c89cfa fix #30376 that broken cross-build 2016-08-24 13:18:18 -07:00
Justin Santa Barbara 902ba4e249 Add network-plugin-mtu option for MTU selection
MTU selection is difficult, and if there is a transport such as IPSEC in
use may be impossible.  So we allow specification of the MTU with the
network-plugin-mtu flag, and we pass this down into the network
provider.

Currently implemented by kubenet.
2016-08-23 01:50:58 -04:00
Kubernetes Submit Queue 5d54c55710 Merge pull request #30212 from feiskyer/kuberuntime-flag
Automatic merge from submit-queue

Kubelet: add --container-runtime-endpoint and --image-service-endpoint

Flag `--container-runtime-endpoint` (overrides `--container-runtime`) is introduced to identify the unix socket file of the remote runtime service. And flag `--image-service-endpoint` is introduced to identify the unix socket file of the image service.

This PR is part of #28789 Milestone 0. 

CC @yujuhong @Random-Liu
2016-08-21 12:03:10 -07:00
Kubernetes Submit Queue a41e6e3817 Merge pull request #30922 from yifan-gu/tls_bootstrap_refactor
Automatic merge from submit-queue

Implement TLS bootstrap for kubelet using `--experimental-bootstrap-kubeconfig`  (2nd take)

Ref kubernetes/features#43 (comment)

cc @gtank @philips @mikedanese @aaronlevy @liggitt @deads2k @errordeveloper @justinsb 


Continue on the older PR https://github.com/kubernetes/kubernetes/pull/30094 as there are too many comments on that one and it's not loadable now.
2016-08-21 03:47:07 -07:00
Kubernetes Submit Queue e9815020eb Merge pull request #30475 from derekwaynecarr/pod-cgroup
Automatic merge from submit-queue

Unblock iterative development on pod-level cgroups

In order to allow forward progress on this feature, it takes the commits from #28017 #29049 and then it globally disables the flag that allows these features to be exercised in the kubelet.  The flag can be re-added to the kubelet when its actually ready.

/cc @vishh @dubstack @kubernetes/rh-cluster-infra
2016-08-19 21:06:48 -07:00
Jordan Liggitt 26a6623261 kubelet: '--experimental-bootstrap-kubeconfig' refactor.
Move bootstrap functions to separate files.
Split some of the functions into small sub-functions for reusability.
Other cleanups
2016-08-19 15:27:23 -07:00
Yifan Gu 26babd4eba kubelet: Add --bootstrap-kubeconfig to get TLS client cert.
Add --bootstrap-kubeconfig flag to kubelet. If the flag is non-empty
and --kubeconfig doesn't exist, then the kubelet will use the bootstrap
kubeconfig to create rest client and generate certificate signing request
to request a client cert from API server.

Once succeeds, the result cert will be written down to
--cert-dir/kubelet-client.crt, and the kubeconfig will be populated with
certfile, keyfile path pointing to the result certificate file, key file.
(The key file is generated before creating the CSR).
2016-08-19 13:51:33 -07:00
Jeff Lowdermilk 51198f59da Add --feature-gates to kube-system components
apiserver,scheduler,controller-manager,proxy,kubelet all get
flag. Using one variable to plumb through config via salt/init
scripts for GCE and GKE
2016-08-19 09:07:43 -07:00
derekwaynecarr fde285cd8f Disable cgroups-per-qos flag until implementation is stabilized 2016-08-19 11:08:59 -04:00
Kubernetes Submit Queue c19e9cc89d Merge pull request #26044 from smarterclayton/multiversion_encode
Automatic merge from submit-queue

Guarantee that Encode handles nested objects again
2016-08-18 21:10:55 -07:00
Pengfei Ni b36ace9a57 Kubelet: add --container-runtime-endpoint and --image-service-endpoint
New flag --container-runtime-endpoint (overrides --container-runtime)
is introduced to kubelet which identifies the unix socket file of
the remote runtime service. And new flag --image-service-endpoint is
introduced to kubelet which identifies the unix socket file of the
image service.
2016-08-19 10:22:44 +08:00
Clayton Coleman 5f8366aac3
Convert() should accept the new conversion Context value
Allows Convert() to reuse the same conversions as ConvertToVersion
without being overly coupled to the version.
2016-08-18 14:45:20 -04:00
Minhan Xia 1acaa1db09 Revert "Revert "syncNetworkUtil in kubelet and fix loadbalancerSourceRange on GCE"" 2016-08-18 10:19:48 -07:00
Clayton Coleman a66828d73e
Allow a flag that forces kubelet to have a valid kubeconfig
--require-kubeconfig forces the kubelet to use the kubeconfig for all
APIserver communication, and exit cleanly.
2016-08-17 16:26:52 -04:00
Daniel Smith 2aa0bb2dfc Revert "syncNetworkUtil in kubelet and fix loadbalancerSourceRange on GCE" 2016-08-16 18:12:28 -07:00
Kubernetes Submit Queue d412d5721d Merge pull request #30486 from freehan/lbsrcfix
Automatic merge from submit-queue

syncNetworkUtil in kubelet and fix loadbalancerSourceRange on GCE

fixes: #29997 #29039

@yujuhong Can you take a look at the kubelet part?

@girishkalele KUBE-MARK-DROP is the chain for dropping connections. Marked connection will be drop  in INPUT/OUTPUT chain of filter table. Let me know if this is good enough for your use case.
2016-08-16 15:22:34 -07:00
Minhan Xia 85fdeb4742 add iptables util parameters to kubelet config type 2016-08-15 15:04:11 -07:00
Kubernetes Submit Queue 79ed7064ca Merge pull request #27970 from jingxu97/restartKubelet-6-22
Automatic merge from submit-queue

Add volume reconstruct/cleanup logic in kubelet volume manager

Currently kubelet volume management works on the concept of desired
and actual world of states. The volume manager periodically compares the
two worlds and perform volume mount/unmount and/or attach/detach
operations. When kubelet restarts, the cache of those two worlds are
gone. Although desired world can be recovered through apiserver, actual
world can not be recovered which may cause some volumes cannot be cleaned
up if their information is deleted by apiserver. This change adds the
reconstruction of the actual world by reading the pod directories from
disk. The reconstructed volume information is added to both desired
world and actual world if it cannot be found in either world. The rest
logic would be as same as before, desired world populator may clean up
the volume entry if it is no longer in apiserver, and then volume
manager should invoke unmount to clean it up.

Fixes https://github.com/kubernetes/kubernetes/issues/27653
2016-08-15 13:48:43 -07:00
Jing Xu f19a1148db This change supports robust kubelet volume cleanup
Currently kubelet volume management works on the concept of desired
and actual world of states. The volume manager periodically compares the
two worlds and perform volume mount/unmount and/or attach/detach
operations. When kubelet restarts, the cache of those two worlds are
gone. Although desired world can be recovered through apiserver, actual
world can not be recovered which may cause some volumes cannot be cleaned
up if their information is deleted by apiserver. This change adds the
reconstruction of the actual world by reading the pod directories from
disk. The reconstructed volume information is added to both desired
world and actual world if it cannot be found in either world. The rest
logic would be as same as before, desired world populator may clean up
the volume entry if it is no longer in apiserver, and then volume
manager should invoke unmount to clean it up.
2016-08-15 11:29:15 -07:00
Kubernetes Submit Queue f279e61e4a Merge pull request #27874 from ingvagabund/kubelet-kernel-tunning-behaviour-new-flags
Automatic merge from submit-queue

[kubelet] Introduce --protect-kernel-defaults flag to make the tunable behaviour configurable

Let's make the default behaviour of kernel tuning configurable. The default behaviour is kept modify as has been so far.
2016-08-12 14:11:26 -07:00
Jan Chaloupka eb967ad143 kubelet: introduce --protect-kernel-defaults to make the KernelTunableBehavior configurable 2016-08-11 13:08:27 +02:00
Michael Taufen e43ccdbf2c Rename KubeletConfiguration.Config to PodManifestPath for clarity
Also provide a new --pod-manifest-path flag and deprecate the old
--config one.

This field holds the location of a manifest file or directory of manifest
files for pods the Kubelet is supposed to run. The name of the field
should reflect that purpose.
2016-08-10 09:40:21 -07:00
Andrey Kurilin 9f1c3a4c56 Fix various typos in kubelet 2016-08-03 01:14:44 +03:00
derekwaynecarr 99bddd23c4 Add eviction minimum reclaim option to kubelet 2016-07-21 10:06:17 -04:00
Buddha Prakash 5000e74664 Inject top level QoS cgroup creation in the Kubelet 2016-07-15 10:02:22 -07:00
Michael Taufen e52718bbc6 Clean up API
Move SystemReserved and KubeReserved into KubeletConfiguration struct
Convert int64 to int32 for some external type fields so they match internal ones
tLS* to tls* for JSON field names
Fix dependency on removed options.AutoDetectCloudProvider
Change floats in KubeletConfiguration API to ints
2016-07-14 18:40:11 -07:00
Michael Taufen 2e49f6b64a Make it build!
Update external KubeletConfiguration type
Add defaults for new KubeletConfiguration fields
Modify some defaults to match upstream settings
Add/rename some conversion functions
Updated codegen
Fixed typos
Mike Danese caught that s.NodeLabels wasn't allocated, fix on line 118
of cmd/kubelet/app/options/options.go.
Provide list of valid sources in comment for HostNetworkSources field
2016-07-14 18:38:58 -07:00
Mike Danese e070cb617a componentconfig: add external kubelet configuration type 2016-07-14 18:38:58 -07:00
derekwaynecarr 4e6a52d872 Enable memory eviction by default 2016-07-07 11:47:16 -04:00
k8s-merge-robot ab37fbf4c2 Merge pull request #28258 from vishh/28231
Automatic merge from submit-queue

[kubelet] Allow opting out of automatic cloud provider detection in kubelet. By default kubelet will auto-detect cloud providers

fixes #28231
2016-06-30 12:27:26 -07:00
Vishnu Kannan ea789e8612 Allow opting out of automatic cloud provider detection in kubelet
Signed-off-by: Vishnu Kannan <vishnuk@google.com>
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-06-29 18:04:29 -07:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Ron Lai 095e04d562 Marking container gc policy deprecated in the future and changing the default value 2016-06-22 13:32:13 -07:00
Random-Liu 52ebd4ecf1 Add runtime-request-timeout kubelet flag. 2016-06-17 18:18:41 -07:00
derekwaynecarr de95be0a76 Fix typo in kubelet help 2016-06-16 15:48:23 -04:00
Saad Ali 9dbe943491 Attach/Detach Controller Kubelet Changes
This PR contains Kubelet changes to enable attach/detach controller control.
* It introduces a new "enable-controller-attach-detach" kubelet flag to
  enable control by controller. Default enabled.
* It removes all references "SafeToDetach" annoation from controller.
* It adds the new VolumesInUse field to the Node Status API object.
* It modifies the controller to use VolumesInUse instead of SafeToDetach
  annotation to gate detachment.
* There is a bug in node-problem-detector that causes VolumesInUse to
  get reset every 30 seconds. Issue https://github.com/kubernetes/node-problem-detector/issues/9
  opened to fix that.
2016-06-02 16:47:11 -07:00
Lucas Käldström 46525a7d19 Fix comment typos in #25972 2016-05-30 15:37:49 +03:00
k8s-merge-robot 04bdd37bc4 Merge pull request #25972 from luxas/remove_arch_constants
Automatic merge from submit-queue

Use pause image depending on the server's platform when testing

Removed all pause image constant strings, now the pause image is chosen by arch. Part of the effort of making e2e arch-agnostic.

The pause image name and version is also now only in two places, and it's documented to bump both
Also removed "amd64" constants in the code. Such constants should be replaced by `runtime.GOARCH` or by looking up the server platform

Fixes: #22876 and #15140
Makes it easier for: #25730
Related: #17981

This is for `v1.3`
@ixdy @thockin @vishh @kubernetes/sig-testing @andyzheng0831 @pensu
2016-05-28 04:48:59 -07:00
Robert Rati 2d487f7c06 Added pods-per-core to kubelet. #25762 2016-05-27 07:10:13 -04:00
Lucas Käldström 79ca1911e1 Removed all pause image constant strings, now the pause image is chosen by arch. Part of the effort of making e2e arch-agnostic 2016-05-26 19:16:43 +03:00
Jess Frazelle aa8c72adaa
seccomp: add annotations and test for docker runtime
Signed-off-by: Jess Frazelle <me@jessfraz.com>
2016-05-24 12:25:21 -07:00
Wojciech Tyczynski 0f881d6120 Use protobufs by default to communicate with apiserver 2016-05-21 11:38:32 +02:00
Derek Parker f307e97f87 kubelet: Add --exit-on-lock-contention flag
This patch adds the --exit-on-lock-contention flag, which must be used
in conjunction with the --lock-file flag. When provided, it causes the
kubelet to wait for inotify events for that lock file. When an 'open'
event is received, the kubelet will exit.
2016-05-18 16:21:47 -07:00
derekwaynecarr d6354a54ad Add kubelet flag for eviction max pod grace period 2016-05-13 11:19:05 -04:00
derekwaynecarr 2c01edf9ea Add eviction-pressure-transition-period flag to kubelet 2016-05-12 17:33:00 -04:00
k8s-merge-robot 08440b5dcc Merge pull request #24836 from Clarifai/gpu-impl
Automatic merge from submit-queue

WIP v0 NVIDIA GPU support

```release-note
* Alpha support for scheduling pods on machines with NVIDIA GPUs whose kubelets use the `--experimental-nvidia-gpus` flag, using the alpha.kubernetes.io/nvidia-gpu resource 
```

Implements part of #24071 for  #23587

I am not familiar with the scheduler enough to know what to do with the scores. Mostly punting for now.

Missing items from the implementation plan: limitranger, rkt support, kubectl
support and docs

cc @erictune @davidopp @dchen1107 @vishh @Hui-Zhi @gopinatht
2016-05-12 14:04:15 -07:00
Rudi Chiarito 362c763fca WIP v0 NVIDIA GPU support
Implements part of #24071

I am not familiar with the scheduler enough to know what to do with the scores. Punting for now.

Missing items from the implementation plan: limitranger, rkt support, kubectl
support and user docs
2016-05-09 19:20:05 -04:00
Muhammed Uluyol f3690e2d5e
build/pause: write in C
Builds statically against glibc. References to the old pause
image have been updated.
2016-05-04 21:45:52 -04:00
Clayton Coleman fdb110c859
Fix the rest of the code 2016-04-29 17:12:10 -04:00
derekwaynecarr 3c9ab576c2 Add kubelet flags for eviction threshold config 2016-04-24 19:03:23 -04:00
Wojciech Tyczynski d6896fa45a Allow setting content-type in binaries 2016-04-21 14:12:13 +02:00
Clayton Coleman 53b48fb414 Move a kubelet flag default to the right place
All defaults belong in the struct, not the flags
2016-04-11 19:30:37 -04:00
AdoHe 1b305ee3bd update kubelet cluster-dns doc 2016-04-01 11:34:34 -04:00
k8s-merge-robot 6226cbe6ca Merge pull request #23308 from yifan-gu/rkt_bump
Automatic merge from submit-queue

rkt: bump rkt version to 1.2.1

Upon bumping the rkt version, `--hostname` is supported. Also we now gets the configs from the rkt api service, so `stage1-image` is deprecated. 

cc @yujuhong @Random-Liu
2016-03-30 05:42:58 -07:00
k8s-merge-robot 2a690cc5e2 Merge pull request #23059 from luxas/auto_arch_pause
Automatic merge from submit-queue

Make kubelet use an arch-specific pause image depending on GOARCH

Related to: #22876, #22683 and #15140
@ixdy @pwittrock @brendandburns @mikedanese @yujuhong @thockin @zmerlynn
2016-03-29 23:27:42 -07:00
Yifan Gu d814d973ff rkt: Bump rkt required version. Get options from api service. 2016-03-28 17:06:14 -07:00
goltermann 32d569d6c7 Fixing all the "composite literal uses unkeyed fields" Vet errors. 2016-03-25 15:25:09 -07:00
Lucas Käldström c6172e58cf Make kubelet use an arch-specific pause image depending on GOARCH 2016-03-25 23:45:59 +02:00
harry 343b1927d1 Refactor config map into sub pkg 2016-03-21 14:50:57 +08:00
Dawn Chen a90ac42dd8 Kill docker daemon after configing cbr0 if flag --babysit-daemon is true so that babysitter process can restart it again with proper configurations and checkpoint file. 2016-03-01 16:46:31 -08:00
Chao Xu 7a85d54d4e fix links 2016-02-29 13:27:29 -08:00
Yu-Ju Hong a07d1411a8 Change default --max-pods in kubelet to 110
Also increase maximum dead containers to 240
2016-02-23 15:37:36 -08:00
Jeff Lowdermilk c406665b2b Plumb node labels through salt
Expose node-labels flag on kubelet for gce via a startup script
env var.
2016-02-22 15:31:34 -08:00
Prashanth Balasubramanian 2e8ff81de1 Teach the kubelet about --hairpin-mode=promiscuous-bridge. 2016-02-20 22:40:54 -08:00
Daniel Smith a8b943dddd Revert "Put the container bridge in promiscuous mode." 2016-02-19 23:14:53 -08:00
Prashanth Balasubramanian a694a7ae4b Teach the kubelet about --hairpin-mode=promiscuous-bridge. 2016-02-19 14:59:16 -08:00
laushinka 7ef585be22 Spelling fixes inspired by github.com/client9/misspell 2016-02-18 06:58:05 +07:00
mqliang 641ba92aa3 move minGCAge to ImageGCPolicy and make it configurable 2016-02-15 22:54:54 +08:00
derekwaynecarr e5e691ed5f Default lockfile to empty string while alpha 2016-02-12 10:50:17 -05:00
Vishnu kannan 575812787d Replace `--resource-container` and `--system-container` with
`--kubelet-cgroups` and `--system-cgroups` respectively.
Updated `--runtime-container` to `--runtime-cgroups`.
Cleaned up most of the kubelet code that consumes these flags to match
the flag name changes.

Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-02-10 17:33:28 -08:00
Vishnu kannan 51e4ccf106 Updating the default values for the cgroups hierarchies that kubelet
creates for managing the nodes.

Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-02-10 16:02:36 -08:00
Vishnu kannan 38efc837b9 Make container runtime's cgroup configurable.
Use the real cgroups for metrics generation.

Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-02-10 16:02:34 -08:00
Mike Danese b3172a4ccf kubelet: add a pidfile 2016-02-10 11:38:50 -08:00
Prashanth Balasubramanian c3a3a2bacd Pipe hairpin-mode flag through kubelet, enable on soak. 2016-02-09 12:12:19 -08:00
Phillip Wittrock 3de94cd23c Supply volume fs metrics to server/stats/handler.go
* Metrics will not be expose until they are hooked up to a handler
* Metrics are not cached and expose a dos vector, this must be fixed before release or the stats should not be exposed through an api endpoint
2016-02-05 16:00:24 -08:00
Marcin Wielgus bf0c881263 Set Docker custom metric label for cAdvisor if custom metric volume is mounted 2016-02-05 12:00:02 +01:00
CJ Cullen 04eb90a5d4 Make tunneler hold tunnels open and healthcheck vs. reopening every 5 minutes.
Also add a test for the Update() logic.
Reordered tunnels vs. storage initialization (prevent a nil ptr panic)
2016-02-02 12:00:29 -08:00
k8s-merge-robot 4eaffd2477 Merge pull request #19900 from vishh/kubelet-cpu-cfs
Auto commit by PR queue bot
2016-02-01 15:18:30 -08:00
k8s-merge-robot 8c821700f3 Merge pull request #19389 from justinsb/internal_cidr
Auto commit by PR queue bot
2016-01-26 03:58:48 -08:00
Mike Danese 1fc630caa0 add ip validation to componentconfig command line 2016-01-21 13:33:30 -08:00
Justin Santa Barbara 58191c446c Allow non-masquerade-cidr to be passed to the kubelet
Removing the hard-coding of 10.0.0.0/8

Issue #11204
2016-01-21 15:18:31 -05:00
Vishnu kannan 214b85e708 Enable CPU CFS quota by default.
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-01-21 10:33:28 -08:00
Mike Danese 1162cfd3b1 kubelet: move most of kubelet server configuration to a config object.
This is part of migrating kubelet configuration to the componentconfig api
group and is preliminary to retrofitting client configuration and
implementing full fledged API group mechinary.

Signed-off-by: Mike Danese <mikedanese@google.com>
2016-01-15 15:31:59 -08:00
Mike Danese 35a3785cf6 kubelet: use ConfigurationMap instead of json 2016-01-14 09:32:42 -08:00
Tim St. Clair e2ffd007f7 Implement node Allocatable
Add `kube-reserved` and `system-reserved` flags for configuration
reserved resources for usage outside of kubernetes pods. Allocatable is
provided by the Kubelet according to the formula:
```
Allocatable = Capacity - KubeReserved - SystemReserved
```

Also provides a method for estimating a reasonable default for
`KubeReserved`, but the current implementation probably is low and needs
more tuning.
2016-01-12 17:00:43 -08:00
Phillip Wittrock f1c8384ff4 Node labels: Remove node-labels-file command line option. Change --node-label format from key=value to key:value to be consitent with how the header key:value is specified on command line. 2016-01-12 12:57:12 -08:00
Clayton Coleman 791d160b42 Split the Kubelet flag options and struct
Reduces the size of the app/server.go file and ensures that the flags
and their defaults are clearly separated.
2016-01-06 21:23:06 -05:00