Commit Graph

66 Commits (14b554cef63f6fc8ac911b17da1730599adf8a66)

Author SHA1 Message Date
Muhammed Uluyol 14b554cef6 Use a persistent volume for the docker registry. 2015-08-20 18:44:11 -07:00
Muhammed Uluyol 7129d477d3 Launch a cluster-local registry.
This registry can be accessed through proxies that run on each node
listening on port 5000. We send the proxy images to the nodes directly
to avoid requests that hit the network during cluster launch. For now,
we continue to pull the registry itself over the network, especially
given its large size (we should be able to dramatically shrink the
image). On GCE we create a PD and use that for storage, otherwise we
use an emptyDir. The registry is not enabled outside of GCE. All
communication is currently plain HTTP. In order to use SSL, we will
need to be able to request a certificate/key from the apiserver signed
by the apiserver's CA cert.
2015-08-20 18:44:05 -07:00
Robert Bailey 8df33bc1a7 Register the kubelet on the master node with an apiserver. This option is
separated from the apiserver running locally on the master node so that it
can be optionally enabled or disabled as needed.

Also, fix the healthchecking configuration for the master components, which
was previously only working by coincidence:

If a kubelet doesn't register with a master, it never bothers to figure out
what its local address is. In which case it ends up constructing a URL like
http://:8080/healthz for the http probe. This happens to work on the master
because all of the pods are using host networking and explicitly binding to
127.0.0.1. Once the kubelet is registered with the master and it determines
the local node address, it tries to healthcheck on an address where the pod
isn't listening and the kubelet periodically restarts each master component
when the liveness probe fails.
2015-08-06 13:39:32 -07:00
gmarek 5bb7eec5ab Use salt pillars to pass test arguments during cluster creation. 2015-07-31 09:32:01 +02:00
Piotr Szczesniak f48543aba5 Made enabling Kube UI configurable 2015-07-27 08:23:04 +02:00
Robert Bailey 728b337e9c Refactor the functions that generate auth for the kubelet and kubeproxy
and remove the insecure configuration now that GKE has plumbed through
certificates.
2015-07-17 16:13:01 -07:00
Eric Paris 58df58f3d7 Remove unused enable_node_monitoring option
Back in 1a7f7245e7 we dropped the one
place this was used, but left all of the variable and definitions and
garbage around cluster/
2015-06-25 20:57:56 -04:00
Tim Hockin 280f99afd9 EOL our registry caching mirror
Docker's v1 registry has gotten slower and slower, and they have no
interest in fixing it.  Using a mirror forces v1 mode.  Measurements
show that v1 with our mirror is slower than v2 with docker's registry in
just about all metrics.
2015-06-24 09:56:59 -07:00
Satnam Singh 55f791ca15 Merge pull request #10050 from zmerlynn/checkbinaries
Validate binaries downloaded from GCS:
2015-06-18 14:14:56 -07:00
Zach Loafman d8da39ecd0 Validate binaries downloaded from GCS:
* Set SHA1 for Kubernetes server binary and Salt tar in kube-env.
* Check SHA1 in configure-vm.sh. If the env variable isn't available,
download the SHA1 from GCS and double check that.
* Fixes a bug in the devel path where we were actually uploading the
wrong sha1 to the bucket.

Fixes #10021
2015-06-18 13:37:05 -07:00
CJ Cullen abf1e768dc Pass through an explicit PROXY_SSH_USER.
Use user@user instead of user@hostname in case hostname is too long.
2015-06-18 10:35:02 -07:00
CJ Cullen 04cd9b3c75 Make sshproxy use a hostmount on master PD (don't spam sshKeys on upgrade/reboot).
Add comment describing what SSHTunnelList.Close() does.
Simplify util.FileExists.
2015-06-05 15:03:03 -07:00
CJ Cullen cb317604ab Some refactoring. Only selectively use ssh proxy.
Add NetworkName to gce.Config.
Add locking to uses of master.tunnels.
2015-06-05 14:55:16 -07:00
Prashanth Balasubramanian f7c0f1c1e3 Set min-request-timeout in test clusters 2015-06-03 08:46:28 -07:00
Brian Grant 3da686fea5 Merge pull request #8894 from cjcullen/kmaster2
Add an explicit variable to indicate whether an instance is master or not
2015-06-02 20:37:43 -07:00
CJ Cullen dcf5b16cea Add an explicit KUBERNETES_MASTER variable to the kube-env. 2015-06-02 17:17:02 -07:00
CJ Cullen 934c553c04 Clarify description/usage of --advertise-address, Master.PublicAddress 2015-06-02 15:23:32 -07:00
CJ Cullen 085a48a70e Add an advertise-address flag. This allows the address that the apiserver binds
to (possibly 0.0.0.0) to be different than the address on which members of the cluster
can reach the apiserver (possibly not a local interface).
2015-06-02 14:33:15 -07:00
Filip Grzadkowski caafd28245 Retry downloading binary tars in case of unpack failure 2015-06-02 14:59:15 +02:00
Wojciech Tyczynski 4fc38849ea Retry downloading tars in case of unpack failure 2015-05-29 13:06:24 +02:00
Tim Hockin ac3cc3c518 Rename PORTAL_NET all over 2015-05-28 16:10:44 -07:00
Prashanth B 1f0b4c5e2a Merge pull request #8232 from zmerlynn/i8196
Ensure basic DNS functionality before doing real work in configure-vm.sh
2015-05-15 10:19:35 -07:00
Robert Bailey 9edc359de7 Fix an unbound variable error when CA_CERT isn't set. 2015-05-14 15:42:16 -07:00
Robert Bailey 9ab41db7ea Static cert distribution for GCE.
To make cert validation work, no longer use the
fqdn for the master name on the node VMs.
2015-05-14 11:59:13 -07:00
Zach Loafman 06c22c699a Ensure basic DNS functionality before doing real work in configure-vm.sh
Fixes #8196. Maybe. If my theory is correct on how we got there. Also
changes the inference of master to be based on the master name, not
the node instance prefix. That way if we somehow have a bogus
hostname, the master will configure itself as a node, the whole
cluster fails, and it's a ton more obvious.
2015-05-13 19:12:53 -07:00
Dawn Chen 309a157665 Merge pull request #7984 from cjcullen/kubelet
Kubelet configure cbr0 instead of configure-vm.sh
2015-05-13 17:32:52 -07:00
Robert Bailey c47b9178b4 Replace the auth config file with a kubeconfig file when
starting the kubelet on GCE.
2015-05-13 01:03:28 -07:00
CJ Cullen 5e3d2b9138 Kubelet configure cbr0 instead of configure-vm.sh 2015-05-12 23:00:12 -07:00
Max Forbes 76c89db5a8 Master vs node salt auth refactor in configure-vm.sh 2015-05-12 13:26:11 -07:00
CJ Cullen fbd125e4e2 Remove restriction that cluster-cidr be a class-b 2015-05-06 15:01:13 -07:00
Jerzy Szczepkowski 58962100db Merge pull request #7827 from zmerlynn/safe_format_cleanup
Clean up safe_format_and_mount spam in the startup logs
2015-05-06 10:50:32 +02:00
Zach Loafman 399f7dee43 Clean up safe_format_and_mount spam in the startup logs
Totally minor cleanup, but I'm tired of seeing it's spam in the
startup logs.
2015-05-05 21:23:57 -07:00
Jerzy Szczepkowski e967ffd522 Added flag to set cluster class B network address for pods, add flag to disable allocation CIDRs for Pods. Fixed synchornization bug in NodeController registerNodes(). 2015-05-05 16:10:43 -07:00
Robert Bailey 9718d667a7 Merge pull request #7744 from zmerlynn/allow_builtin_salt
Skip SaltStack install if it's already installed
2015-05-04 16:32:56 -07:00
Zach Loafman dd7f3f7df7 Skip SaltStack install if it's already installed
Next ContainerVM image will have SaltStack in it. Also be a little
less persnickety if it's found running. This isn't the case, but we
don't have to be aggressive.
2015-05-04 16:12:53 -07:00
Eric Paris 6b3a6e6b98 Make copyright ownership statement generic
Instead of saying "Google Inc." (which is not always correct) say "The
Kubernetes Authors", which is generic.
2015-05-01 17:49:56 -04:00
Robert Bailey 8206aa9eac Salt configuration to add basic auth to GCE. 2015-04-28 14:07:54 -07:00
Eric Tune 9044177bb6 Generate a token for kube-proxy.
Tested on GCE.
Includes untested modifications for AWS and Vagrant.
No changes for any other distros.
Probably will work on other up-to-date providers
but beware.  Symptom would be that service proxying
stops working.

 1. Generates a token kube-proxy in AWS, GCE, and Vagrant setup scripts.
 1. Distributes the token via salt-overlay, and salt to /var/lib/kube-proxy/kubeconfig
 1. Changes kube-proxy args:
   - use the --kubeconfig argument
   - changes --master argument from http://MASTER:7080 to https://MASTER
     - http -> https
     - explicit port 7080 -> implied 443

Possible ways this might break other distros:

Mitigation: there is an default empty kubeconfig file.
If the distro does not populate the salt-overlay, then
it should get the empty, which parses to an empty
object, which, combined with the --master argument,
should still work.

Mitigation:
  - azure: Special case to use 7080 in
  - rackspace: way out of date, so don't care.
  - vsphere: way out of date, so don't care.
  - other distros: not using salt.
2015-04-27 08:59:57 -07:00
Eric Tune e8a83b23d1 Pass KUBELET_TOKEN in kube-env metadata.
ensure-kube-token is not needed anymore because
the token passed in kube-env.

In the up case it is set, in the push case it is an empty string
but not used.

Allow unset KUBELET_TOKEN (for push case).

Fix comment.
2015-04-23 15:21:27 -07:00
Robert Bailey dc45f7f9e6 Remove nginx and replace basic auth with bearer token auth for GCE.
- Configure the apiserver to listen securely on 443 instead of 6443.
 - Configure the kubelet to connect to 443 instead of 6443.
 - Update documentation to refer to bearer tokens instead of basic auth.
2015-04-22 11:11:20 -07:00
Zach Loafman 86468cd29d Revert "Added kube-proxy token." 2015-04-22 10:55:08 -07:00
Eric Tune 2ca8a9d15d Added kube-proxy token.
Generates the new token on AWS, GCE, Vagrant.
Renames instance metadata from "kube-token" to "kubelet-token".
(Is this okay for GKE?)

Having separate tokens for kubelet and kube-proxy permits
using principle of least privilege, makes it easy to
rate limit the clients separately, allows annotation
of apiserver logs with the client identity at a finer grain
than just source-ip.
2015-04-21 09:21:31 -07:00
Zach Loafman bcb63642b8 Make reboots work on GCE/GKE
* Fixes an issue where salt-minion would actually come up after reboot
(upstart is horrible obnoxious)
* Caches .deb downloads
* Handles PD remount on reboot correctly
* Notes a future optimization

Fixes #5666
2015-04-17 12:12:00 -07:00
Zach Loafman 9e5fd874cc First hack at upgrade script for GCE:
Address #6075: Shoot the master VM while saving the master-pd. This
takes a couple of minor changes to configure-vm.sh, some of which also
would be necessary for reboot. In particular, I changed it so that the
kube-token instance metadata is no longer required after inception;
instead, we mount the master-pd and see if we've already created the
known tokens file before blocking on the instance metadata.

Also partially addresses #6099 in bash by refactoring the kube-push
path.
2015-04-05 11:42:34 -07:00
Eric Tune 59daeabaee Make secrets at cluster startup.
These secrets will be used in subsequent PRs by:
scheduler, controller-manager, monitoring services,
logging services, and skydns.

Each of these services will then be able to stop using kubernetes-ro
or host networking.
2015-04-02 15:58:45 -07:00
CJ Cullen 5e6e67ba59 Add an alternative TokenSource to the GCE CloudProvider. 2015-04-01 17:52:30 -07:00
Alex Robinson 4f9b1c486f Don't ever give up on retrying downloads in the GCE download-or-bust function. 2015-04-02 00:40:19 +00:00
Zach Loafman 6c219885e0 s/apiservers/api_servers/ in Salt
It looks like api_servers finally won this battle. Kill off the
last remaining places passing it, but allow the kubelet Salt to
accept apiservers for a period of time.

(This was bothering my OCD.)
2015-03-31 12:29:46 -07:00
Victor Marmol 0c75f26a74 Merge pull request #6148 from zmerlynn/brctl_complaint
Fix "brctl: invalid command" message appearing in startup logs
2015-03-30 08:01:30 -07:00
Zach Loafman b3636bba34 Fix "brctl: invalid command" message appearing in startup logs
We were actually failing to call brctl in configure-vm.sh. I finally
tracked it down to the attempt to delete the docker0 bridge. This
particular package was getting installed later by Salt anyways, so
all this PR is doing is moving the package install up from Salt to
bash.

Also adds some minor logging.
2015-03-29 18:30:33 -07:00