Commit Graph

424 Commits (64213419ff74e5d17c400a4adf3b8b948fd10f99)

Author SHA1 Message Date
Pavithra Ramesh 6d7c5e90ed Removed .salt template , using .sed template
Removed default config options from yaml.
Removed unused yaml files
2018-11-13 18:33:34 -08:00
Pavithra Ramesh 73b548db06 Support running a nodelocal dns cache
This change includes the yaml files and gce startup script changes
to run this addon. It is disabled by default, can be enabled by setting
KUBE_ENABLE_NODELOCAL_DNS=true
An ip address is required for the cache instance to listen for
requests on, default is a link local ip address of value 169.254.25.10

addressed review comments, updated image location
Picked a different prometheus port so stats port is not same as the
coredns deployment

Removed the nodelocaldns-ready label.
Set memory limit to 30Mi
2018-11-12 14:54:20 -08:00
Jean-Francois Chevrette c4ea93c42b update list of default admission plugins 2018-09-30 15:40:34 -04:00
Jean-Francois Chevrette 816c56b619 set default admission plugins on local-up-cluster.sh 2018-09-28 20:49:13 -04:00
k8s-ci-robot 9505330dc8
Merge pull request #69030 from zhangmingld/fixlocalup
fix allow-priviledge not work in local-up-cluster
2018-09-27 15:53:28 -07:00
k8s-ci-robot 3f01e09afe
Merge pull request #68970 from yue9944882/fixes-bsd-sed-compatibility
Fixes bsd / gnu sed compatibility for local-up-cluster script
2018-09-27 06:06:49 -07:00
k8s-ci-robot 9f681f0f6e
Merge pull request #68778 from xychu/add-reuse-certs
Add REUSE_CERT to skip creaing new ca/cert files
2018-09-26 04:57:08 -07:00
zhangmingld 909677802e fix allow-priviledge not work in local-up-cluster 2018-09-25 17:07:18 +08:00
zuoxiu.jm fbff5fd084 fixes bsd / gnu sed 2018-09-24 19:42:14 +08:00
Xiangyang Chu f4d8aa1ca4 Update according to review comments.
Will rebase before merge
2018-09-20 16:45:28 +08:00
Xiangyang Chu 385d18d05e Add REUSE_CERT to skip creaing new ca/cert files
It's maybe useful with PERSERVE_ETCD to run apiserver using existed
certs, so that service account secrets will keep valid.
2018-09-18 17:39:15 +08:00
Derek Carr acdb1b0e98 Fix local-up-cluster when specifying CERT_DIR 2018-09-13 12:45:07 -04:00
Marian Lobur 3f730d4c25 Remove deprecated legacy audit logging code. 2018-08-23 12:08:54 +02:00
Kubernetes Submit Queue 24fa5edb60
Merge pull request #66739 from islinwb/ipvs_mods_check
Automatic merge from submit-queue (batch tested with PRs 66489, 66728, 66739). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

remove incomplete check of ipvs modules in hack/local-up-cluster.sh

**What this PR does / why we need it**:
Currently `hack/local-up-cluster.sh` executes `sudo modprobe -a ip_vs ip_vs_rr ip_vs_wrr ip_vs_sh nf_conntrack_ipv4` to check whether the ipvs required modules exist, which leaves out the scenario https://github.com/kubernetes/kubernetes/issues/63801 mentioned.
Since `func CanUseIPVSProxier` in  `pkg/proxy/ipvs/proxier.go` covers all scenarios, maybe we should just remove this part instead of adding codes.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-07-30 17:10:07 -07:00
Kubernetes Submit Queue 28b6fb5f7d
Merge pull request #66729 from dims/switch-off-leader-election-in-local-up-cluster
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Switch off leader election for scheduler and kube/cloud controller

**What this PR does / why we need it**:

We now have leader election on by default, for a single node
local-up-cluster, this is not needed. Let's switch it off

This will reduce the flakiness and timeouts we see in the local e2e CI jobs.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-07-28 13:26:17 -07:00
Kubernetes Submit Queue 91a1ed88de
Merge pull request #66723 from dims/enable-etcd-logging-in-local-e2e-jobs
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

enable etcd logging in local-e2e jobs

**What this PR does / why we need it**:

We are not saving the etcd logs and just redirecting the output
to /dev/null. In this change, we set ETCD_LOGFILE to the same
directory where we log other kube relates processes.


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

**Special notes for your reviewer**:
See example run in http://gcsweb.k8s.io/gcs/kubernetes-jenkins/pr-logs/pull/66608/pull-kubernetes-local-e2e/254/artifacts/kubetest-local263115757/

**Release note**:

```release-note
NONE
```
2018-07-28 00:53:56 -07:00
Weibin Lin 2e79fd6954 remove incomplete check of ipvs modules in hack/local-up-cluster.sh 2018-07-28 14:43:42 +08:00
Davanum Srinivas b42efcf63c
Switch off leader election for scheduler and kube/cloud controller
We now have leader election on by default, for a single node
local-up-cluster, this is not needed. Let's switch it off

Change-Id: I5cc4c3b9f74e318f378f239d1e8ee84603b3a6ef
2018-07-27 18:57:09 -04:00
Davanum Srinivas b96969347d
Grab docker log using a soft link in local-up-cluster
Would be useful to debug problems like timeouts and missing images etc
for the local e2e jobs.

Change-Id: I959db8e189cafef0f6a80fc0b1d865d1cb7f1de7
2018-07-27 15:35:01 -04:00
Davanum Srinivas d98c21e912
enable etcd logging in local-e2e jobs
We are not saving the etcd logs and just redirecting the output
to /dev/null. In this change, we set ETCD_LOGFILE to the same
directory where we log other kube relates processes.

Change-Id: I719a941665b749b864f2efdcdfc7ddc7b2a61776
2018-07-27 14:50:40 -04:00
Jordan Liggitt d98cbb2332
Disable initializers by default 2018-07-10 15:14:32 -04:00
Hemant Kumar 8db5328c4c Implement fixes for flexvolume when kubelet is contanerized
Fix bug with nsenter root path
2018-07-03 14:04:52 -04:00
Kubernetes Submit Queue f0c89c00a0
Merge pull request #65374 from jpeeler/warning-timestamp
Automatic merge from submit-queue (batch tested with PRs 60150, 65467, 65487, 65595, 65374). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add warning function that includes timestamp

Knowing when a process has terminated is helpful when looking through log files. The scenario that happened to me was that /tmp filled up, so as expected things failed. But I'd really like to know when things got bad without looking through 10G log files.

Release note:
```release-note
NONE
```
2018-06-28 19:15:19 -07:00
Jeff Peeler ae271b4db0 Add warning function that includes timestamp
Knowing when a process has terminated is helpful when looking through
log files (especially very large ones). This also refactors the terminal
coloring function to be used with custom prefix and colors.

warning_log outputs red text in the current e2e inspired format:
W0628 16:58:26]: this is a test
2018-06-28 16:58:39 -04:00
Kubernetes Submit Queue 5e16fd5526
Merge pull request #57355 from gnufied/disable-keep-terminated-pod-volumes-default
Automatic merge from submit-queue (batch tested with PRs 65230, 57355, 59174, 63698, 63659). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

keep-terminated-pod-volumes should be false

This flag already has been marked as deprecated. We should avoid setting it in local clusters.

xref https://github.com/kubernetes/kubernetes/pull/47539
2018-06-19 20:19:12 -07:00
Hemant Kumar 9e1674d7f0 keep-terminated-pod-volumes should be false
Remove keep terminated volumes. The flag has already been
deprecated.
2018-06-07 09:48:28 -04:00
Kubernetes Submit Queue 36a3daa355
Merge pull request #61610 from rajansandeep/kubeupaddon
Automatic merge from submit-queue (batch tested with PRs 61610, 64591, 58143, 63929). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Create CoreDNS and kube-dns folders

**What this PR does / why we need it**:
Separate the CoreDNS and kube-dns manifests by creating their own folders (dns/coredns and dns/kube-dns) 

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
cc @MrHohn
2018-06-04 12:26:12 -07:00
m1093782566 674a31e4d6 remove ipvs feature gateway 2018-05-30 10:43:16 +08:00
Sandeep Rajan 753632d85b create coredns and kube-dns folders 2018-05-29 11:52:57 -04:00
Kubernetes Submit Queue ad4b283ee9
Merge pull request #63151 from YonatanKiron/enable-local-cluster-port-range
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add optional flag of node port range

**What this PR does / why we need it**:
Add option of setting port range when using hack/local-up-cluster.sh
**Which issue(s) this PR fixes**
Inability to set port range flag

**Release note**:

```release-note
NONE
```
2018-05-21 20:45:32 -07:00
Yonatan Kiron 0b7b2de8c8 Add optional flag of node port range 2018-05-21 12:22:49 +03:00
Doug MacEachern 2dd3fbda0b Use absolute path for KUBECTL default in local up cluster
This avoids having to set the KUBECTL env var if local-up-cluster.sh is run outside of the repo root.
2018-05-09 16:25:59 -07:00
Kubernetes Submit Queue b5f61ac129
Merge pull request #62657 from matthyx/master
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Update all script shebangs to use /usr/bin/env interpreter instead of /bin/interpreter

This is required to support systems where bash doesn't reside in /bin (such as NixOS, or the *BSD family) and allow users to specify a different interpreter version through $PATH manipulation.
https://www.cyberciti.biz/tips/finding-bash-perl-python-portably-using-env.html
```release-note
Use /usr/bin/env in all script shebangs to increase portability.
```
2018-05-02 19:44:32 -07:00
Davanum Srinivas b44c68eb2e Hack for testing until test-infra/pull/7846 merges 2018-04-25 06:12:20 -04:00
Davanum Srinivas f2959ab2b0 Support containerized kubelet in CI
* Adjust hyperkube Makefile to allow HYPERKUBE_BIN to be
    specified from outside

  * new DOCKER_ROOT variable to specify --root-dir and associated
    volume for kubelet to know where docker directory lives

  * Save the docker logs when we kill the kubelet container

  * Allow customized image for dockerized kubelet and build a Default
    image if one is not specified

  We should allow a custom build using script we have:
  `VERSION="latest" REGISTRY="k8s.gcr.io" hack/dev-push-hyperkube.sh`

  to be used quickly using DOCKERIZE_KUBELET. To do this we remove the
  hard coded `k8s.gcr.io/kubelet` image and introduce a new environment
  variable `KUBELET_IMAGE`.

  Note that we are switching to hyperkube from kubelet as we have a quick
  and easy script to build hyperkube image and load it into local docker
  daemon. This reduces bad hacks like `docker tag
  k8s.gcr.io/hyperkube-amd64:<tag> k8s.gcr.io/kubelet:latest` being used
  by folks today (see 62057)

  * Better cope with PID 0 when running "docker inspect" to look for
    the process id for kubelet container
2018-04-24 10:19:50 -04:00
Kubernetes Submit Queue 43a5c65979
Merge pull request #60085 from jpeeler/remove-podpreset
Automatic merge from submit-queue (batch tested with PRs 62726, 60085, 62583). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Remove podpreset in local up cluster

This was enabled in 6a7aca3129, but
shouldn't have been since the podpreset implementation is in the process
of being moved into service-catalog.

Release note:
```release-note
NONE
```
2018-04-19 11:00:18 -07:00
Matthias Bertschy 9b15af19b2 Update all script to use /usr/bin/env bash in shebang 2018-04-19 13:20:13 +02:00
Kubernetes Submit Queue 1ee2ac07c1
Merge pull request #60633 from pohly/local-up-cluster-enhancements
Automatic merge from submit-queue (batch tested with PRs 62445, 62768, 60633). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Local up cluster enhancements

**What this PR does / why we need it**:

Networking in a cluster brought up by hack/local-up-cluster.sh was broken because kube-proxy fails to start: connectivity to the Internet is okay, but anything involving communication among services (for example, starting cluster DNS) fails.

Debugging this took a while because there was no indication in the output of hack/local-up-cluster.sh that something had gone wrong. There were also some harmless "no such process" errors during cleanup.

The kube-proxy startup issue was fixed in parallel by PR #60431 but that fix turned out to be incomplete, so this PR uses a different approach, suppresses the harmless error messages (caused by a race) and also makes it more obvious when processes die by checking them regularly.

**Special notes for your reviewer**:

I used

     KUBE_ENABLE_CLUSTER_DNS=true NET_PLUGIN=kubenet hack/local-up-cluster.sh -O

to start the cluster. Check the kube-dns pod and its logs to see how kube-dns fails to communicate with the API server.

I've left out health checking of kubelet when run under Docker because that isn't something that I have used myself yet and I wanted to send the enhancements without further delays. I can try to add that later once you agree that such a health check is useful.

**Release note**:
```release-note
fix network setup in hack/local-up-cluster.sh (https://github.com/kubernetes/kubernetes/pull/60431)
better error diagnostics in hack/local-up-cluster.sh output
```
2018-04-18 12:25:12 -07:00
Kubernetes Submit Queue b2f19b0d0d
Merge pull request #62057 from cofyc/fixlocalupscript
Automatic merge from submit-queue (batch tested with PRs 58784, 62057, 62621, 62652, 62656). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Update docker run flags for containized kubelet in hack/local-up-cluster.sh

**What this PR does / why we need it**:

I'm working on https://github.com/kubernetes/kubernetes/issues/61741, and found `docker run` flags in `hack/local-up-cluster.sh` for kubelet container is too old.

- /var/lib/docker should be mount read-write, because kubelet needs to
  update /etc/resolv.conf file in container, see #29378
- /var/lib/kubelet should be mount shared, because mountpoints under
  this directory must be propagated to other containers
- `--pid=host` is needed to run `nsenter --mount=/rootfs/proc/1/ns/mnt -- /usr/bin/systemd-run --scope` correctly (don't know exact reason, but with `--pid=host`, it works)
- configure cluster dns for kubelet running in a container
- should propagate sub-mounts of / to kubelet for local volume

With this fix, we can start a local cluster with containerized kubelet.

```
# pull or build a hyperkube image first
docker tag k8s.gcr.io/hyperkube-amd64:<tag> k8s.gcr.io/kubelet:latest
export DOCKERIZE_KUBELET=y
./hack/local-up-cluster.sh
```

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

**Special notes for your reviewer**:

refer to: https://github.com/kubernetes/kubernetes-anywhere/blob/master/phase2/ignition/vanilla/kubelet.service.

**Release note**:

```release-note
NONE
```
2018-04-16 12:58:14 -07:00
Yecheng Fu 0f9b0beee7 Fix docker run flags and kubelet flags for containized kubelet:
- /var/lib/docker should be mount read-write, because kubelet needs to
  update /etc/resolv.conf file in container, see #29378
- /var/lib/kubelet should be mount rslave, because mountpoints under
  this directory must be propagated to other containers
- `--pid=host` is needed to run `nsenter --mount=/rootfs/proc/1/ns/mnt -- /usr/bin/systemd-run --scope` correctly
- configure cluster dns for kubelet running in a container
- should propagate sub-mounts of / to kubelet for local volume
- Use rslave to mount /var/lib/docker/ so we can see what the host
  mounts under this path.
- Keep containerized kubelet flags same as non-containerized and check
  kubelet is running or not.
- Use `all_kubelet_flags` to share kubelet flags.
2018-04-14 11:15:24 +08:00
Jeff Peeler d839053878 Remove podpreset in local up cluster
This was enabled in 6a7aca3129, but
shouldn't have been since the podpreset implementation is in the process
of being moved into service-catalog.
2018-04-13 17:39:27 -04:00
Patrick Ohly 731c92896b local-up-cluster: fix kube-proxy featureGates configuration
Commit 43cb024402 replaced command line parameters with a .yaml
configuration file. But feature gates must be configured with a map in
.yaml, not with a comma-separated string as in the command line
parameters. As a result, kube-proxy failed to start and networking was
broken in the cluster.

Commit c339fc0c4f tried to fix that by moving feature gates back to
the command line, but later it was found out that the command line
parameter gets ignored when also specifying a config.

Therefore now the feature gates variable gets converted into a proper
map in the config.
2018-04-12 17:55:09 +02:00
Patrick Ohly 9cf35f355b local-up-cluster: warn about failing processes
This helps developers detect when something went wrong and then also
points them in the right direction by showing where the corresponding
log file is, if there is one.

For example, since commit 43cb024402 in April 2017 kube-proxy failed
to start because featureGates was not set correctly in the .yaml file,
but no-one seems to have noticed this.
2018-04-12 17:55:09 +02:00
Patrick Ohly 426e4820bc local-up-cluster: avoid "No such process" messages when cleaning up
Killing processes in cleanup is racing with those processes
terminating by themselves when aborting local-up-cluster.sh with
CTRL-C. That leads to unnecessary error messages:

  ^CCleaning up...
  kill: (21592): No such process
  kill: (21586): No such process
2018-04-12 17:38:47 +02:00
Kubernetes Submit Queue c70dd5aa43
Merge pull request #61584 from AkihiroSuda/preserve-etcd
Automatic merge from submit-queue (batch tested with PRs 59027, 62333, 57661, 62086, 61584). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

local-up-cluster.sh: support preserving etcd optionally

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>



**What this PR does / why we need it**:

Allow `hack/local-up-cluster.sh` to support preserve `ETCD_DIR` when `PRESERVE` is set to non-false value.

usage:
```
$ PRESERVE=true ETCD_DIR=/var/lib/etcd-kube-HEAD .... \
   ./hack/local-up-cluster.sh
```

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

**Special notes for your reviewer**:
(None)

**Release note**:

```release-note
None
```
2018-04-10 22:53:26 -07:00
Akihiro Suda 9ac411709a local-up-cluster.sh: support preserving etcd optionally
usage: PRESERVE_ETCD=true ETCD_DIR=/var/lib/etcd-kube-HEAD .... \
         ./hack/local-up-cluster.sh

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-04-10 17:18:19 +09:00
Ken'ichi Ohmichi aa6e5c8d42 Make FAIL_SWAP_ON warning message clear
When operating local-up-cluster.sh to prepare e2e tests, the warning
message can be output. This commit makes the message clear.
2018-04-03 17:41:47 -07:00
Kubernetes Submit Queue 399b835f54
Merge pull request #61432 from filbranden/killrkt1
Automatic merge from submit-queue (batch tested with PRs 61904, 61565, 61401, 61432, 61772). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Remove rktnetes code

**What this PR does / why we need it**:
rktnetes is scheduled to be deprecated in 1.10 (#53601). According to the deprecation policy for beta CLI and flags, we can remove the feature in 1.11.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
Removed rknetes code, which was deprecated in 1.10.
```

/assign @yujuhong 
/hold

Hold until the end of the freeze.
2018-03-29 11:46:19 -07:00
Davanum Srinivas 1f4246957f Allow curl --max-time to be configurable
In nested virutalized environments, the 1 second max-time is too
low. Just bumping up WAIT_FOR_URL_API_SERVER does not work unless
we bump up the max-time too. Let us just make it configurable like
so folks can customize to their environment.
2018-03-28 10:21:15 -04:00
Filipe Brandenburger 366ad30ab6 Remove references to rkt from shell scripts in cluster/ and hack/. 2018-03-27 09:29:35 -07:00