Production-Grade Container Scheduling and Management
Go to file
Eric Paris d8187e26d3 Fix build with --use_go_build (e2e.test failure)
hack/build-go.sh --use_go_build would fail because e2e.test was not being
excluded from the set of things that we were "go build"ing

Instead of walking all binaries, only walk static and nonstatic
```
$ hack/build-go.sh
+++ [0524 18:09:51] Building go targets for linux/amd64:
    cmd/kube-proxy
    cmd/kube-apiserver
    cmd/kube-controller-manager
    cmd/kubelet
    cmd/hyperkube
    cmd/kubernetes
    plugin/cmd/kube-scheduler
    cmd/kubectl
    cmd/integration
    cmd/gendocs
    cmd/genman
    cmd/genbashcomp
    examples/k8petstore/web-server
    github.com/onsi/ginkgo/ginkgo
    test/e2e/e2e.test
+++ [0524 18:09:51] +++ Warning: stdlib pkg with cgo flag not found.
+++ [0524 18:09:51] +++ Warning: stdlib pkg cannot be rebuilt since /usr/lib/golang/pkg is not writable by eparis
+++ [0524 18:09:51] +++ Warning: Make /usr/lib/golang/pkg writable for eparis for a one-time stdlib install, Or
+++ [0524 18:09:51] +++ Warning: Rebuild stdlib using the command 'CGO_ENABLED=0 go install -a -installsuffix cgo std'
+++ [0524 18:09:51] +++ Falling back to go build, which is slower
    **************can't load package: package github.com/GoogleCloudPlatform/kubernetes/test/e2e/e2e.test: cannot find package "github.com/GoogleCloudPlatform/kubernetes/test/e2e/e2e.test" in any of:
    /usr/lib/golang/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/e2e.test (from $GOROOT)
    /storage/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/e2e.test (from $GOPATH)
    /storage/kubernetes/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/test/e2e/e2e.test
!!! Error in /storage/kubernetes/hack/lib/golang.sh:339
  'go build -o "${outfile}" "${goflags[@]:+${goflags[@]}}" -ldflags "${version_ldflags}" "${binary}"' exited with status 1
Call stack:
  1: /storage/kubernetes/hack/lib/golang.sh:339 kube::golang::build_binaries_for_platform(...)
  2: /storage/kubernetes/hack/lib/golang.sh:488 kube::golang::build_binaries(...)
  3: hack/build-go.sh:26 main(...)
Exiting with status 1
!!! Error in /storage/kubernetes/hack/lib/golang.sh:406
  '( kube::golang::setup_env; local version_ldflags; version_ldflags=$(kube::version::ldflags); local host_platform; host_platform=$(kube::golang::host_platform); local goflags; eval "goflags=(${KUBE_GOFLAGS:-})"; local use_go_build; local -a targets=(); local arg; for arg in "$@";
do
    if [[ "${arg}" == "--use_go_build" ]]; then
        use_go_build=true;
    else
        if [[ "${arg}" == -* ]]; then
            goflags+=("${arg}");
        else
            targets+=("${arg}");
        fi;
    fi;
done; if [[ ${#targets[@]} -eq 0 ]]; then
    targets=("${KUBE_ALL_TARGETS[@]}");
fi; local -a platforms=("${KUBE_BUILD_PLATFORMS[@]:+${KUBE_BUILD_PLATFORMS[@]}}"); if [[ ${#platforms[@]} -eq 0 ]]; then
    platforms=("${host_platform}");
fi; local binaries; binaries=($(kube::golang::binaries_from_targets "${targets[@]}")); local parallel=false; if [[ ${#platforms[@]} -gt 1 ]]; then
    local gigs; gigs=$(kube::golang::get_physmem); if [[ ${gigs} -gt ${KUBE_PARALLEL_BUILD_MEMORY} ]]; then
        kube::log::status "Multiple platforms requested and available ${gigs}G > threshold ${KUBE_PARALLEL_BUILD_MEMORY}G, building platforms in parallel"; parallel=true;
    else
        kube::log::status "Multiple platforms requested, but available ${gigs}G < threshold ${KUBE_PARALLEL_BUILD_MEMORY}G, building platforms in serial"; parallel=false;
    fi;
fi; if [[ "${parallel}" == "true" ]]; then
    kube::log::status "Building go targets for ${platforms[@]} in parallel (output will appear in a burst when complete):" "${targets[@]}"; local platform; for platform in "${platforms[@]}";
    do
        ( kube::golang::set_platform_envs "${platform}"; kube::log::status "${platform}: go build started"; kube::golang::build_binaries_for_platform ${platform} ${use_go_build:-}; kube::log::status "${platform}: go build finished" ) &> "/tmp//${platform//\//_}.build" &
    done; local fails=0; for job in $(jobs -p);
    do
        wait ${job} || let "fails+=1";
    done; for platform in "${platforms[@]}";
    do
        cat "/tmp//${platform//\//_}.build";
    done; exit ${fails};
else
    for platform in "${platforms[@]}";
    do
        kube::log::status "Building go targets for ${platform}:" "${targets[@]}"; kube::golang::set_platform_envs "${platform}"; kube::golang::build_binaries_for_platform ${platform} ${use_go_build:-};
    done;
fi )' exited with status 1
Call stack:
  1: /storage/kubernetes/hack/lib/golang.sh:406 kube::golang::build_binaries(...)
  2: hack/build-go.sh:26 main(...)
Exiting with status 1
```
2015-05-24 19:16:26 -04:00
api/swagger-spec Update swagger 2015-05-18 17:22:00 -07:00
build Add ga-beacon analytics to gendocs scripts 2015-05-15 18:56:38 -07:00
cluster Automatically open NodePort firewall rules for e2e tests 2015-05-22 22:39:40 -04:00
cmd Merge pull request #8720 from cjcullen/clusterName 2015-05-22 16:53:57 -07:00
contrib Add Type to ServiceSpec: ClusterIP or LoadBalancer 2015-05-22 19:14:21 -04:00
docs Merge pull request #8547 from caesarxuchao/volumes-doc 2015-05-23 20:16:22 -07:00
examples Merge pull request #8707 from justinsb/nodeport 2015-05-22 16:46:59 -07:00
Godeps Merge pull request #8651 from lavalamp/e2e-timeout 2015-05-22 15:14:23 -07:00
hack Fix build with --use_go_build (e2e.test failure) 2015-05-24 19:16:26 -04:00
hooks Automatically generate conversions 2015-05-20 17:11:18 +02:00
pkg Continue to support (deprecated) publicIPs 2015-05-23 16:37:27 -04:00
plugin Merge pull request #8233 from csrwng/connect_adm_ctrl 2015-05-21 14:35:28 -04:00
test e2e fix: set NodePort back to 0, when changing from NodePort -> ClusterIP 2015-05-22 22:20:29 -04:00
third_party Add variable expansion and design doc 2015-05-18 15:59:55 -04:00
www Add v1beta3 api call to web ui 2015-05-21 13:51:59 -07:00
.gitignore Restore WebUI breadcrumbs 2015-05-15 20:35:13 -07:00
.travis.yml Adding a script to update etcd objects 2015-05-15 16:20:35 -07:00
CHANGELOG.md Add ga-beacon analytics to gendocs scripts 2015-05-15 18:56:38 -07:00
CONTRIB.md Add ga-beacon analytics to gendocs scripts 2015-05-15 18:56:38 -07:00
CONTRIBUTING.md Add ga-beacon analytics to gendocs scripts 2015-05-15 18:56:38 -07:00
DESIGN.md Add ga-beacon analytics to gendocs scripts 2015-05-15 18:56:38 -07:00
LICENSE
logo_usage_guidelines.md Add ga-beacon analytics to gendocs scripts 2015-05-15 18:56:38 -07:00
logo.pdf
logo.png
logo.svg
Makefile
README.md Add ga-beacon analytics to gendocs scripts 2015-05-15 18:56:38 -07:00
shippable.yml Adding a script to update etcd objects 2015-05-15 16:20:35 -07:00
Vagrantfile Merge pull request #7617 from pronix/add_libvirt_vagrant_provider 2015-05-18 08:27:51 -04:00

Kubernetes

GoDoc Travis Coverage Status

I am ...

  • Interested in learning more about using Kubernetes? Please see our user-facing documentation on kubernetes.io
  • Interested in hacking on the core Kubernetes code base? Keep reading!

Kubernetes is an open source system for managing containerized applications across multiple hosts, providing basic mechanisms for deployment, maintenance, and scaling of applications.

Kubernetes is:

  • lean: lightweight, simple, accessible
  • portable: public, private, hybrid, multi cloud
  • extensible: modular, pluggable, hookable, composable
  • self-healing: auto-placement, auto-restart, auto-replication

Kubernetes builds upon a decade and a half of experience at Google running production workloads at scale, combined with best-of-breed ideas and practices from the community.


Kubernetes can run anywhere!

However, initial development was done on GCE and so our instructions and scripts are built around that. If you make it work on other infrastructure please let us know and contribute instructions/code.

Kubernetes is in pre-production beta!

While the concepts and architecture in Kubernetes represent years of experience designing and building large scale cluster manager at Google, the Kubernetes project is still under heavy development. Expect bugs, design and API changes as we bring it to a stable, production product over the coming year.

Concepts

Kubernetes works with the following concepts:

Clusters are the compute resources on top of which your containers are built. Kubernetes can run anywhere! See the Getting Started Guides for instructions for a variety of services.

Pods are a colocated group of Docker containers with shared volumes. They're the smallest deployable units that can be created, scheduled, and managed with Kubernetes. Pods can be created individually, but it's recommended that you use a replication controller even if creating a single pod. More about pods.

Replication controllers manage the lifecycle of pods. They ensure that a specified number of pods are running at any given time, by creating or killing pods as required. More about replication controllers.

Services provide a single, stable name and address for a set of pods. They act as basic load balancers. More about services.

Labels are used to organize and select groups of objects based on key:value pairs. More about labels.

Documentation

Kubernetes documentation is organized into several categories.

  • Getting Started Guides
  • User Documentation
    • User FAQ
    • in docs
    • for people who want to run programs on kubernetes
    • describes current features of the system (with brief mentions of planned features)
  • Developer Documentation
    • in docs/devel
    • for people who want to contribute code to kubernetes
    • covers development conventions
    • explains current architecture and project plans
  • Service Documentation
    • in docs/services.md
    • Service FAQ
    • for people who are interested in how Services work
    • details of kube-proxy iptables
    • how to wire services to external internet
  • API documentation
    • in the API doc
    • and automatically generated API documentation served by the master
  • Design Documentation
    • in docs/design
    • for people who want to understand the design choices made
    • describes tradeoffs, alternative designs
    • descriptions of planned features that are too long for a github issue.
  • Walkthroughs and Examples
    • in examples
    • Hands on introduction and example config files
  • Wiki/FAQ

Community, discussion and support

If you have questions or want to start contributing please reach out. We don't bite!

The Kubernetes team is hanging out on IRC on the #google-containers channel on freenode.net. This client may be overloaded from time to time. If this happens you can use any IRC client out there to talk to us.

We also have the google-containers Google Groups mailing list for questions and discussion as well as the kubernetes-announce mailing list for important announcements (low-traffic, no chatter).

If you are a company and are looking for a more formal engagement with Google around Kubernetes and containers at Google as a whole, please fill out this form and we'll be in touch.

Analytics