Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -88,8 +88,8 @@ option to the apiserver during startup. The plugin is implemented in
|
||||
For details on how to use keystone to manage projects and users, refer to the
|
||||
[Keystone documentation](http://docs.openstack.org/developer/keystone/). Please note that
|
||||
this plugin is still experimental which means it is subject to changes.
|
||||
Please refer to the [discussion](https://github.com/GoogleCloudPlatform/kubernetes/pull/11798#issuecomment-129655212)
|
||||
and the [blueprint](https://github.com/GoogleCloudPlatform/kubernetes/issues/11626) for more details
|
||||
Please refer to the [discussion](https://github.com/kubernetes/kubernetes/pull/11798#issuecomment-129655212)
|
||||
and the [blueprint](https://github.com/kubernetes/kubernetes/issues/11626) for more details
|
||||
|
||||
## Plugin Development
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ spec:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- /usr/local/bin/kube-apiserver --address=127.0.0.1 --etcd-servers=http://127.0.0.1:4001
|
||||
--cloud-provider=gce --admission-control=NamespaceLifecycle,NamespaceExists,LimitRanger,SecurityContextDeny,ServiceAccount,ResourceQuota
|
||||
--cloud-provider=gce --admission-control=NamespaceLifecycle,LimitRanger,SecurityContextDeny,ServiceAccount,ResourceQuota
|
||||
--service-cluster-ip-range=10.0.0.0/16 --client-ca-file=/srv/kubernetes/ca.crt
|
||||
--basic-auth-file=/srv/kubernetes/basic_auth.csv --cluster-name=e2e-test-bburns
|
||||
--tls-cert-file=/srv/kubernetes/server.cert --tls-private-key-file=/srv/kubernetes/server.key
|
||||
|
||||
@@ -52,9 +52,7 @@ cluster's shared state through which all other components interact.
|
||||
--admission-control-config-file="": File with admission control configuration.
|
||||
--advertise-address=<nil>: The IP address on which to advertise the apiserver to members of the cluster. This address must be reachable by the rest of the cluster. If blank, the --bind-address will be used. If --bind-address is unspecified, the host's default interface will be used.
|
||||
--allow-privileged=false: If true, allow privileged containers.
|
||||
--api-burst=0: API burst amount for the read only port
|
||||
--api-prefix="": The prefix for API requests on the server. Default '/api'.
|
||||
--api-rate=0: API rate limit as QPS for the read only port
|
||||
--authorization-mode="": Selects how to do authorization on the secure port. One of: AlwaysAllow,AlwaysDeny,ABAC
|
||||
--authorization-policy-file="": File with authorization policy in csv format, used with --authorization-mode=ABAC, on the secure port.
|
||||
--basic-auth-file="": If set, the file that will be used to admit requests to the secure port of the API server via http basic authentication.
|
||||
|
||||
@@ -122,7 +122,7 @@ See [Admission control: Limit Range](../design/admission_control_limit_range.md)
|
||||
|
||||
A namespace can be in one of two phases:
|
||||
* `Active` the namespace is in use
|
||||
* ```Terminating`` the namespace is being deleted, and can not be used for new objects
|
||||
* `Terminating` the namespace is being deleted, and can not be used for new objects
|
||||
|
||||
See the [design doc](../design/namespaces.md#phases) for more details.
|
||||
|
||||
@@ -166,8 +166,8 @@ This delete is asynchronous, so for a time you will see the namespace in the `Te
|
||||
|
||||
## Namespaces and DNS
|
||||
|
||||
When you create a [Service](../../docs/user-guide/services.md), it creates a corresponding [DNS entry](dns.md)1.
|
||||
This entry is of the form `<service-name>.<namespace-name>.cluster.local`, which means
|
||||
When you create a [Service](../../docs/user-guide/services.md), it creates a corresponding [DNS entry](dns.md).
|
||||
This entry is of the form `<service-name>.<namespace-name>.svc.cluster.local`, which means
|
||||
that if a container just uses `<service-name>` it will resolve to the service which
|
||||
is local to a namespace. This is useful for using the same configuration across
|
||||
multiple namespaces such as Development, Staging and Production. If you want to reach
|
||||
|
||||
@@ -253,7 +253,7 @@ on each kubelet where you want to reserve resources.
|
||||
|
||||
Node is a top-level resource in the kubernetes REST API. More details about the
|
||||
API object can be found at: [Node API
|
||||
object](https://htmlpreview.github.io/?https://github.com/GoogleCloudPlatform/kubernetes/HEAD/docs/api-reference/definitions.html#_v1_node).
|
||||
object](https://htmlpreview.github.io/?https://github.com/kubernetes/kubernetes/HEAD/docs/api-reference/definitions.html#_v1_node).
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -51,7 +51,7 @@ The `kubelet` manages [pods](../user-guide/pods.md) and their containers, their
|
||||
|
||||
### `kube-proxy`
|
||||
|
||||
Each node also runs a simple network proxy and load balancer (see the [services FAQ](https://github.com/GoogleCloudPlatform/kubernetes/wiki/Services-FAQ) for more details). This reflects `services` (see [the services doc](../user-guide/services.md) for more details) as defined in the Kubernetes API on each node and can do simple TCP and UDP stream forwarding (round robin) across a set of backends.
|
||||
Each node also runs a simple network proxy and load balancer (see the [services FAQ](https://github.com/kubernetes/kubernetes/wiki/Services-FAQ) for more details). This reflects `services` (see [the services doc](../user-guide/services.md) for more details) as defined in the Kubernetes API on each node and can do simple TCP and UDP stream forwarding (round robin) across a set of backends.
|
||||
|
||||
Service endpoints are currently found via [DNS](../admin/dns.md) or through environment variables (both [Docker-links-compatible](https://docs.docker.com/userguide/dockerlinks/) and Kubernetes `{FOO}_SERVICE_HOST` and `{FOO}_SERVICE_PORT` variables are supported). These variables resolve to ports managed by the service proxy.
|
||||
|
||||
|
||||
@@ -713,6 +713,13 @@ Annotations have very different intended usage from labels. We expect them to be
|
||||
|
||||
In fact, experimental API fields, including to represent fields of newer alpha/beta API versions in the older, stable storage version, may be represented as annotations with the prefix `experimental.kubernetes.io/`.
|
||||
|
||||
Other advice regarding use of labels, annotations, and other generic map keys by Kubernetes components and tools:
|
||||
- Key names should be all lowercase, with words separated by dashes, such as `desired-replicas`
|
||||
- Prefix the key with `kubernetes.io/` or `foo.kubernetes.io/`, preferably the latter if the label/annotation is specific to `foo`
|
||||
- For instance, prefer `service-account.kubernetes.io/name` over `kubernetes.io/service-account.name`
|
||||
- Use annotations to store API extensions that the controller responsible for the resource doesn't need to know about, experimental fields that aren't intended to be generally used API fields, etc. Beware that annotations aren't automatically handled by the API conversion machinery.
|
||||
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
|
||||
@@ -189,17 +189,82 @@ API call might POST an object in API v7beta1 format, which uses the cleaner
|
||||
form (since v7beta1 is "beta"). When the user reads the object back in the
|
||||
v7beta1 API it would be unacceptable to have lost all but `Params[0]`. This
|
||||
means that, even though it is ugly, a compatible change must be made to the v6
|
||||
API. However, this is very challenging to do correctly. It generally requires
|
||||
API.
|
||||
|
||||
However, this is very challenging to do correctly. It often requires
|
||||
multiple representations of the same information in the same API resource, which
|
||||
need to be kept in sync in the event that either is changed. However, if
|
||||
the new representation is more expressive than the old, this breaks
|
||||
backward compatibility, since clients that only understood the old representation
|
||||
need to be kept in sync in the event that either is changed. For example,
|
||||
let's say you decide to rename a field within the same API version. In this case,
|
||||
you add units to `height` and `width`. You implement this by adding duplicate
|
||||
fields:
|
||||
|
||||
```go
|
||||
type Frobber struct {
|
||||
Height *int `json:"height"`
|
||||
Width *int `json:"width"`
|
||||
HeightInInches *int `json:"heightInInches"`
|
||||
WidthInInches *int `json:"widthInInches"`
|
||||
}
|
||||
```
|
||||
|
||||
You convert all of the fields to pointers in order to distinguish between unset and
|
||||
set to 0, and then set each corresponding field from the other in the defaulting
|
||||
pass (e.g., `heightInInches` from `height`, and vice versa), which runs just prior
|
||||
to conversion. That works fine when the user creates a resource from a hand-written
|
||||
configuration -- clients can write either field and read either field, but what about
|
||||
creation or update from the output of GET, or update via PATCH (see
|
||||
[In-place updates](../user-guide/managing-deployments.md#in-place-updates-of-resources))?
|
||||
In this case, the two fields will conflict, because only one field would be updated
|
||||
in the case of an old client that was only aware of the old field (e.g., `height`).
|
||||
|
||||
Say the client creates:
|
||||
|
||||
```json
|
||||
{
|
||||
"height": 10,
|
||||
"width": 5
|
||||
}
|
||||
```
|
||||
|
||||
and GETs:
|
||||
|
||||
```json
|
||||
{
|
||||
"height": 10,
|
||||
"heightInInches": 10,
|
||||
"width": 5,
|
||||
"widthInInches": 5
|
||||
}
|
||||
```
|
||||
|
||||
then PUTs back:
|
||||
|
||||
```json
|
||||
{
|
||||
"height": 13,
|
||||
"heightInInches": 10,
|
||||
"width": 5,
|
||||
"widthInInches": 5
|
||||
}
|
||||
```
|
||||
|
||||
The update should not fail, because it would have worked before `heightInInches` was added.
|
||||
|
||||
Therefore, when there are duplicate fields, the old field MUST take precedence
|
||||
over the new, and the new field should be set to match by the server upon write.
|
||||
A new client would be aware of the old field as well as the new, and so can ensure
|
||||
that the old field is either unset or is set consistently with the new field. However,
|
||||
older clients would be unaware of the new field. Please avoid introducing duplicate
|
||||
fields due to the complexity they incur in the API.
|
||||
|
||||
A new representation, even in a new API version, that is more expressive than an old one
|
||||
breaks backward compatibility, since clients that only understood the old representation
|
||||
would not be aware of the new representation nor its semantics. Examples of
|
||||
proposals that have run into this challenge include [generalized label
|
||||
selectors](http://issues.k8s.io/341) and [pod-level security
|
||||
context](http://prs.k8s.io/12823).
|
||||
|
||||
As another interesting example, enumerated values provide a unique challenge.
|
||||
As another interesting example, enumerated values cause similar challenges.
|
||||
Adding a new value to an enumerated set is *not* a compatible change. Clients
|
||||
which assume they know how to handle all possible values of a given field will
|
||||
not be able to handle the new values. However, removing value from an
|
||||
@@ -227,6 +292,21 @@ the release notes for the next release by labeling the PR with the "release-note
|
||||
|
||||
If you found that your change accidentally broke clients, it should be reverted.
|
||||
|
||||
In short, the expected API evolution is as follows:
|
||||
* `experimental/v1alpha1` ->
|
||||
* `newapigroup/v1alpha1` -> ... -> `newapigroup/v1alphaN` ->
|
||||
* `newapigroup/v1beta1` -> ... -> `newapigroup/v1betaN` ->
|
||||
* `newapigroup/v1` ->
|
||||
* `newapigroup/v2alpha1` -> ...
|
||||
|
||||
While in experimental we have no obligation to move forward with the API at all and may delete or break it at any time.
|
||||
|
||||
While in alpha we expect to move forward with it, but may break it.
|
||||
|
||||
Once in beta we will preserve forward compatibility, but may introduce new versions and delete old ones.
|
||||
|
||||
v1 must be backward-compatible for an extended length of time.
|
||||
|
||||
## Changing versioned APIs
|
||||
|
||||
For most changes, you will probably find it easiest to change the versioned
|
||||
@@ -319,6 +399,10 @@ The conversion code resides with each versioned API. There are two files:
|
||||
functions
|
||||
- `pkg/api/<version>/conversion_generated.go` containing auto-generated
|
||||
conversion functions
|
||||
- `pkg/expapi/<version>/conversion.go` containing manually written conversion
|
||||
functions
|
||||
- `pkg/expapi/<version>/conversion_generated.go` containing auto-generated
|
||||
conversion functions
|
||||
|
||||
Since auto-generated conversion functions are using manually written ones,
|
||||
those manually written should be named with a defined convention, i.e. a function
|
||||
@@ -353,6 +437,7 @@ of your versioned api objects.
|
||||
|
||||
The deep copy code resides with each versioned API:
|
||||
- `pkg/api/<version>/deep_copy_generated.go` containing auto-generated copy functions
|
||||
- `pkg/expapi/<version>/deep_copy_generated.go` containing auto-generated copy functions
|
||||
|
||||
To regenerate them:
|
||||
- run
|
||||
|
||||
@@ -62,7 +62,7 @@ conflict***.
|
||||
|
||||
Now that we've structured cherry picks as PRs, searching for all cherry-picks
|
||||
against a release is a GitHub query: For example,
|
||||
[this query is all of the v0.21.x cherry-picks](https://github.com/GoogleCloudPlatform/kubernetes/pulls?utf8=%E2%9C%93&q=is%3Apr+%22automated+cherry+pick%22+base%3Arelease-0.21)
|
||||
[this query is all of the v0.21.x cherry-picks](https://github.com/kubernetes/kubernetes/pulls?utf8=%E2%9C%93&q=is%3Apr+%22automated+cherry+pick%22+base%3Arelease-0.21)
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -34,9 +34,9 @@ Documentation for other releases can be found at
|
||||
# Kubernetes CLI/Configuration Roadmap
|
||||
|
||||
See github issues with the following labels:
|
||||
* [area/app-config-deployment](https://github.com/GoogleCloudPlatform/kubernetes/labels/area/app-config-deployment)
|
||||
* [component/CLI](https://github.com/GoogleCloudPlatform/kubernetes/labels/component/CLI)
|
||||
* [component/client](https://github.com/GoogleCloudPlatform/kubernetes/labels/component/client)
|
||||
* [area/app-config-deployment](https://github.com/kubernetes/kubernetes/labels/area/app-config-deployment)
|
||||
* [component/CLI](https://github.com/kubernetes/kubernetes/labels/component/CLI)
|
||||
* [component/client](https://github.com/kubernetes/kubernetes/labels/component/client)
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -30,12 +30,57 @@ Documentation for other releases can be found at
|
||||
<!-- END STRIP_FOR_RELEASE -->
|
||||
|
||||
<!-- END MUNGE: UNVERSIONED_WARNING -->
|
||||
Coding style advice for contributors
|
||||
Code conventions
|
||||
- Bash
|
||||
- https://google-styleguide.googlecode.com/svn/trunk/shell.xml
|
||||
- Ensure that build, release, test, and cluster-management scripts run on OS X
|
||||
- Go
|
||||
- https://github.com/golang/go/wiki/CodeReviewComments
|
||||
- https://gist.github.com/lavalamp/4bd23295a9f32706a48f
|
||||
- Ensure your code passes the [presubmit checks](development.md#hooks)
|
||||
- [Go Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments)
|
||||
- [Effective Go](https://golang.org/doc/effective_go.html)
|
||||
- Comment your code.
|
||||
- [Go's commenting conventions](http://blog.golang.org/godoc-documenting-go-code)
|
||||
- If reviewers ask questions about why the code is the way it is, that's a sign that comments might be helpful.
|
||||
- Command-line flags should use dashes, not underscores
|
||||
- Naming
|
||||
- Please consider package name when selecting an interface name, and avoid redundancy.
|
||||
- e.g.: `storage.Interface` is better than `storage.StorageInterface`.
|
||||
- Do not use uppercase characters, underscores, or dashes in package names.
|
||||
- Please consider parent directory name when choosing a package name.
|
||||
- so pkg/controllers/autoscaler/foo.go should say `package autoscaler` not `package autoscalercontroller`.
|
||||
- Unless there's a good reason, the `package foo` line should match the name of the directory in which the .go file exists.
|
||||
- Importers can use a different name if they need to disambiguate.
|
||||
- API conventions
|
||||
- [API changes](api_changes.md)
|
||||
- [API conventions](api-conventions.md)
|
||||
- [Kubectl conventions](kubectl-conventions.md)
|
||||
- [Logging conventions](logging.md)
|
||||
|
||||
Testing conventions
|
||||
- All new packages and most new significant functionality must come with unit tests
|
||||
- Table-driven tests are preferred for testing multiple scenarios/inputs; for example, see [TestNamespaceAuthorization](../../test/integration/auth_test.go)
|
||||
- Significant features should come with integration (test/integration) and/or end-to-end (test/e2e) tests
|
||||
- Including new kubectl commands and major features of existing commands
|
||||
- Unit tests must pass on OS X and Windows platforms - if you use Linux specific features, your test case must either be skipped on windows or compiled out (skipped is better when running Linux specific commands, compiled out is required when your code does not compile on Windows).
|
||||
|
||||
Directory and file conventions
|
||||
- Avoid package sprawl. Find an appropriate subdirectory for new packages. (See [#4851](http://issues.k8s.io/4851) for discussion.)
|
||||
- Libraries with no more appropriate home belong in new package subdirectories of pkg/util
|
||||
- Avoid general utility packages. Packages called "util" are suspect. Instead, derive a name that describes your desired function. For example, the utility functions dealing with waiting for operations are in the "wait" package and include functionality like Poll. So the full name is wait.Poll
|
||||
- Go source files and directories use underscores, not dashes
|
||||
- Package directories should generally avoid using separators as much as possible (when packages are multiple words, they usually should be in nested subdirectories).
|
||||
- Document directories and filenames should use dashes rather than underscores
|
||||
- Contrived examples that illustrate system features belong in /docs/user-guide or /docs/admin, depending on whether it is a feature primarily intended for users that deploy applications or cluster administrators, respectively. Actual application examples belong in /examples.
|
||||
- Examples should also illustrate [best practices for using the system](../user-guide/config-best-practices.md)
|
||||
- Third-party code
|
||||
- Third-party Go code is managed using Godeps
|
||||
- Other third-party code belongs in /third_party
|
||||
- Third-party code must include licenses
|
||||
- This includes modified third-party code and excerpts, as well
|
||||
|
||||
Coding advice
|
||||
- Go
|
||||
- [Go landmines](https://gist.github.com/lavalamp/4bd23295a9f32706a48f)
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -112,6 +112,8 @@ fixups (e.g. automated doc formatting), use one or more commits for the
|
||||
changes to tooling and a final commit to apply the fixup en masse. This makes
|
||||
reviews much easier.
|
||||
|
||||
See [Faster Reviews](faster_reviews.md) for more details.
|
||||
|
||||
## godep and dependency management
|
||||
|
||||
Kubernetes uses [godep](https://github.com/tools/godep) to manage dependencies. It is not strictly required for building Kubernetes but it is required when managing dependencies under the Godeps/ tree, and is required by a number of the build and test scripts. Please make sure that ``godep`` is installed and in your ``$PATH``.
|
||||
|
||||
@@ -53,15 +53,24 @@ later, just as soon as they have more free time (ha!).
|
||||
|
||||
Let's talk about how to avoid this.
|
||||
|
||||
## 0. Familiarize yourself with project conventions
|
||||
|
||||
* [Development guide](development.md)
|
||||
* [Coding conventions](coding-conventions.md)
|
||||
* [API conventions](api-conventions.md)
|
||||
* [Kubectl conventions](kubectl-conventions.md)
|
||||
|
||||
## 1. Don't build a cathedral in one PR
|
||||
|
||||
Are you sure FeatureX is something the Kubernetes team wants or will accept, or
|
||||
that it is implemented to fit with other changes in flight? Are you willing to
|
||||
bet a few days or weeks of work on it? If you have any doubt at all about the
|
||||
usefulness of your feature or the design - make a proposal doc or a sketch PR
|
||||
or both. Write or code up just enough to express the idea and the design and
|
||||
why you made those choices, then get feedback on this. Now, when we ask you to
|
||||
change a bunch of facets of the design, you don't have to re-write it all.
|
||||
usefulness of your feature or the design - make a proposal doc (in docs/proposals;
|
||||
for example [the QoS proposal](http://prs.k8s.io/11713)) or a sketch PR (e.g., just
|
||||
the API or Go interface) or both. Write or code up just enough to express the idea
|
||||
and the design and why you made those choices, then get feedback on this. Be clear
|
||||
about what type of feedback you are asking for. Now, if we ask you to change a
|
||||
bunch of facets of the design, you won't have to re-write it all.
|
||||
|
||||
## 2. Smaller diffs are exponentially better
|
||||
|
||||
@@ -154,7 +163,20 @@ commit and re-push. Your reviewer can then look at that commit on its own - so
|
||||
much faster to review than starting over.
|
||||
|
||||
We might still ask you to clean up your commits at the very end, for the sake
|
||||
of a more readable history.
|
||||
of a more readable history, but don't do this until asked, typically at the point
|
||||
where the PR would otherwise be tagged LGTM.
|
||||
|
||||
General squashing guidelines:
|
||||
|
||||
* Sausage => squash
|
||||
|
||||
When there are several commits to fix bugs in the original commit(s), address reviewer feedback, etc. Really we only want to see the end state and commit message for the whole PR.
|
||||
|
||||
* Layers => don't squash
|
||||
|
||||
When there are independent changes layered upon each other to achieve a single goal. For instance, writing a code munger could be one commit, applying it could be another, and adding a precommit check could be a third. One could argue they should be separate PRs, but there's really no way to test/review the munger without seeing it applied, and there needs to be a precommit check to ensure the munged output doesn't immediately get out of date.
|
||||
|
||||
A commit, as much as possible, should be a single logical change. Each commit should always have a good title line (<70 characters) and include an additional description paragraph describing in more detail the change intended. Do not link pull requests by `#` in a commit description, because GitHub creates lots of spam. Instead, reference other PRs via the PR your commit is in.
|
||||
|
||||
## 8. KISS, YAGNI, MVP, etc
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ spec:
|
||||
- name: TEST_PACKAGE
|
||||
value: pkg/tools
|
||||
- name: REPO_SPEC
|
||||
value: https://github.com/GoogleCloudPlatform/kubernetes
|
||||
value: https://github.com/kubernetes/kubernetes
|
||||
```
|
||||
|
||||
Note that we omit the labels and the selector fields of the replication controller, because they will be populated from the labels field of the pod template by default.
|
||||
|
||||
@@ -44,18 +44,18 @@ We use the Prometheus monitoring system's golang client library for instrumentin
|
||||
2. Give the metric a name and description.
|
||||
3. Pick whether you want to distinguish different categories of things using labels on the metric. If so, add "Vec" to the name of the type of metric you want and add a slice of the label names to the definition.
|
||||
|
||||
https://github.com/GoogleCloudPlatform/kubernetes/blob/cd3299307d44665564e1a5c77d0daa0286603ff5/pkg/apiserver/apiserver.go#L53
|
||||
https://github.com/GoogleCloudPlatform/kubernetes/blob/cd3299307d44665564e1a5c77d0daa0286603ff5/pkg/kubelet/metrics/metrics.go#L31
|
||||
https://github.com/kubernetes/kubernetes/blob/cd3299307d44665564e1a5c77d0daa0286603ff5/pkg/apiserver/apiserver.go#L53
|
||||
https://github.com/kubernetes/kubernetes/blob/cd3299307d44665564e1a5c77d0daa0286603ff5/pkg/kubelet/metrics/metrics.go#L31
|
||||
|
||||
3. Register the metric so that prometheus will know to export it.
|
||||
|
||||
https://github.com/GoogleCloudPlatform/kubernetes/blob/cd3299307d44665564e1a5c77d0daa0286603ff5/pkg/kubelet/metrics/metrics.go#L74
|
||||
https://github.com/GoogleCloudPlatform/kubernetes/blob/cd3299307d44665564e1a5c77d0daa0286603ff5/pkg/apiserver/apiserver.go#L78
|
||||
https://github.com/kubernetes/kubernetes/blob/cd3299307d44665564e1a5c77d0daa0286603ff5/pkg/kubelet/metrics/metrics.go#L74
|
||||
https://github.com/kubernetes/kubernetes/blob/cd3299307d44665564e1a5c77d0daa0286603ff5/pkg/apiserver/apiserver.go#L78
|
||||
|
||||
4. Use the metric by calling the appropriate method for your metric type (Set, Inc/Add, or Observe, respectively for Gauge, Counter, or Histogram/Summary), first calling WithLabelValues if your metric has any labels
|
||||
|
||||
https://github.com/GoogleCloudPlatform/kubernetes/blob/3ce7fe8310ff081dbbd3d95490193e1d5250d2c9/pkg/kubelet/kubelet.go#L1384
|
||||
https://github.com/GoogleCloudPlatform/kubernetes/blob/cd3299307d44665564e1a5c77d0daa0286603ff5/pkg/apiserver/apiserver.go#L87
|
||||
https://github.com/kubernetes/kubernetes/blob/3ce7fe8310ff081dbbd3d95490193e1d5250d2c9/pkg/kubelet/kubelet.go#L1384
|
||||
https://github.com/kubernetes/kubernetes/blob/cd3299307d44665564e1a5c77d0daa0286603ff5/pkg/apiserver/apiserver.go#L87
|
||||
|
||||
|
||||
These are the metric type definitions if you're curious to learn about them or need more information:
|
||||
|
||||
@@ -33,7 +33,7 @@ Documentation for other releases can be found at
|
||||
GitHub Issues for the Kubernetes Project
|
||||
========================================
|
||||
|
||||
A list quick overview of how we will review and prioritize incoming issues at https://github.com/GoogleCloudPlatform/kubernetes/issues
|
||||
A list quick overview of how we will review and prioritize incoming issues at https://github.com/kubernetes/kubernetes/issues
|
||||
|
||||
Priorities
|
||||
----------
|
||||
|
||||
@@ -34,7 +34,7 @@ Documentation for other releases can be found at
|
||||
Kubectl Conventions
|
||||
===================
|
||||
|
||||
Updated: 8/12/2015
|
||||
Updated: 8/27/2015
|
||||
|
||||
**Table of Contents**
|
||||
<!-- BEGIN MUNGE: GENERATED_TOC -->
|
||||
@@ -77,6 +77,31 @@ Updated: 8/12/2015
|
||||
* Flags are all lowercase, with words separated by hyphens
|
||||
* Flag names and single-character aliases should have the same meaning across all commands
|
||||
* Command-line flags corresponding to API fields should accept API enums exactly (e.g., --restart=Always)
|
||||
* Do not reuse flags for different semantic purposes, and do not use different flag names for the same semantic purpose -- grep for `"Flags()"` before adding a new flag
|
||||
* Use short flags sparingly, only for the most frequently used options, prefer lowercase over uppercase for the most common cases, try to stick to well known conventions for UNIX commands and/or Docker, where they exist, and update this list when adding new short flags
|
||||
* `-f`: Resource file
|
||||
* also used for `--follow` in `logs`, but should be deprecated in favor of `-F`
|
||||
* `-l`: Label selector
|
||||
* also used for `--labels` in `expose`, but should be deprecated
|
||||
* `-L`: Label columns
|
||||
* `-c`: Container
|
||||
* also used for `--client` in `version`, but should be deprecated
|
||||
* `-i`: Attach stdin
|
||||
* `-t`: Allocate TTY
|
||||
* also used for `--template`, but deprecated
|
||||
* `-w`: Watch (currently also used for `--www` in `proxy`, but should be deprecated)
|
||||
* `-p`: Previous
|
||||
* also used for `--pod` in `exec`, but deprecated
|
||||
* also used for `--patch` in `patch`, but should be deprecated
|
||||
* also used for `--port` in `proxy`, but should be deprecated
|
||||
* `-P`: Static file prefix in `proxy`, but should be deprecated
|
||||
* `-r`: Replicas
|
||||
* `-u`: Unix socket
|
||||
* `-v`: Verbose logging level
|
||||
* `--dry-run`: Don't modify the live state; simulate the mutation and display the output
|
||||
* `--local`: Don't contact the server; just do local read, transformation, generation, etc. and display the output
|
||||
* `--output-version=...`: Convert the output to a different API group/version
|
||||
* `--validate`: Validate the resource schema
|
||||
|
||||
## Output conventions
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ With the final markdown all set, cut and paste it to the top of `CHANGELOG.md`
|
||||
|
||||
### 5) Update the Release page
|
||||
|
||||
* Switch to the [releases](https://github.com/GoogleCloudPlatform/kubernetes/releases) page.
|
||||
* Switch to the [releases](https://github.com/kubernetes/kubernetes/releases) page.
|
||||
* Open up the release you are working on.
|
||||
* Cut and paste the final markdown from above into the release notes
|
||||
* Press Save.
|
||||
|
||||
@@ -52,7 +52,7 @@ Life of a Pull Request
|
||||
|
||||
Unless in the last few weeks of a milestone when we need to reduce churn and stabilize, we aim to be always accepting pull requests.
|
||||
|
||||
Either the [on call](https://github.com/GoogleCloudPlatform/kubernetes/wiki/Kubernetes-on-call-rotation) manually or the [submit queue](https://github.com/contrib/tree/master/submit-queue) automatically will manage merging PRs.
|
||||
Either the [on call](https://github.com/kubernetes/kubernetes/wiki/Kubernetes-on-call-rotation) manually or the [submit queue](https://github.com/contrib/tree/master/submit-queue) automatically will manage merging PRs.
|
||||
|
||||
There are several requirements for the submit queue to work:
|
||||
* Author must have signed CLA ("cla: yes" label added to PR)
|
||||
|
||||
@@ -76,7 +76,7 @@ These guidelines say *what* to do. See the Rationale section for *why*.
|
||||
|
||||
If you have a cluster partially working, but doing all the above steps seems like too much work,
|
||||
we still want to hear from you. We suggest you write a blog post or a Gist, and we will link to it on our wiki page.
|
||||
Just file an issue or chat us on IRC and one of the committers will link to it from the wiki.
|
||||
Just file an issue or chat us on [Slack](../troubleshooting.md#slack) and one of the committers will link to it from the wiki.
|
||||
|
||||
## Development Distro Guidelines
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ EC2 with user data (cloud-config).
|
||||
### Command line administration tool: `kubectl`
|
||||
|
||||
The cluster startup script will leave you with a `kubernetes` directory on your workstation.
|
||||
Alternately, you can download the latest Kubernetes release from [this page](https://github.com/GoogleCloudPlatform/kubernetes/releases).
|
||||
Alternately, you can download the latest Kubernetes release from [this page](https://github.com/kubernetes/kubernetes/releases).
|
||||
|
||||
Next, add the appropriate binary folder to your `PATH` to access kubectl:
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ You can create a virtual network:
|
||||
|
||||
Now you're ready.
|
||||
|
||||
You can download and install the latest Kubernetes release from [this page](https://github.com/GoogleCloudPlatform/kubernetes/releases), then run the `<kubernetes>/cluster/kube-up.sh` script to start the cluster:
|
||||
You can download and install the latest Kubernetes release from [this page](https://github.com/kubernetes/kubernetes/releases), then run the `<kubernetes>/cluster/kube-up.sh` script to start the cluster:
|
||||
|
||||
cd kubernetes
|
||||
cluster/kube-up.sh
|
||||
|
||||
@@ -37,7 +37,7 @@ You can either build a release from sources or download a pre-built release. If
|
||||
|
||||
### Prebuilt Binary Release
|
||||
|
||||
The list of binary releases is available for download from the [GitHub Kubernetes repo release page](https://github.com/GoogleCloudPlatform/kubernetes/releases).
|
||||
The list of binary releases is available for download from the [GitHub Kubernetes repo release page](https://github.com/kubernetes/kubernetes/releases).
|
||||
|
||||
Download the latest release and unpack this tar file on Linux or OS X, cd to the created `kubernetes/` directory, and then follow the getting started guide for your cloud.
|
||||
|
||||
@@ -48,7 +48,7 @@ Get the Kubernetes source. If you are simply building a release from source the
|
||||
Building a release is simple.
|
||||
|
||||
```bash
|
||||
git clone https://github.com/GoogleCloudPlatform/kubernetes.git
|
||||
git clone https://github.com/kubernetes/kubernetes.git
|
||||
cd kubernetes
|
||||
make release
|
||||
```
|
||||
|
||||
@@ -57,7 +57,7 @@ In this guide I will demonstrate how to deploy a Kubernetes cluster to Azure clo
|
||||
To get started, you need to checkout the code:
|
||||
|
||||
```sh
|
||||
git clone https://github.com/GoogleCloudPlatform/kubernetes
|
||||
git clone https://github.com/kubernetes/kubernetes
|
||||
cd kubernetes/docs/getting-started-guides/coreos/azure/
|
||||
```
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ In the next few steps you will be asked to configure these files and host them o
|
||||
To get the Kubernetes source, clone the GitHub repo, and build the binaries.
|
||||
|
||||
```
|
||||
git clone https://github.com/GoogleCloudPlatform/kubernetes.git
|
||||
git clone https://github.com/kubernetes/kubernetes.git
|
||||
cd kubernetes
|
||||
./build/release.sh
|
||||
```
|
||||
|
||||
@@ -412,7 +412,7 @@ On the PXE server make and fill in the variables `vi /var/www/html/coreos/pxe-cl
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Kubernetes API Server
|
||||
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
|
||||
Documentation=https://github.com/kubernetes/kubernetes
|
||||
Requires=etcd.service
|
||||
After=etcd.service
|
||||
[Service]
|
||||
@@ -432,7 +432,7 @@ On the PXE server make and fill in the variables `vi /var/www/html/coreos/pxe-cl
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Kubernetes Controller Manager
|
||||
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
|
||||
Documentation=https://github.com/kubernetes/kubernetes
|
||||
Requires=kube-apiserver.service
|
||||
After=kube-apiserver.service
|
||||
[Service]
|
||||
@@ -448,7 +448,7 @@ On the PXE server make and fill in the variables `vi /var/www/html/coreos/pxe-cl
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Kubernetes Scheduler
|
||||
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
|
||||
Documentation=https://github.com/kubernetes/kubernetes
|
||||
Requires=kube-apiserver.service
|
||||
After=kube-apiserver.service
|
||||
[Service]
|
||||
@@ -579,7 +579,7 @@ On the PXE server make and fill in the variables `vi /var/www/html/coreos/pxe-cl
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Kubernetes Proxy
|
||||
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
|
||||
Documentation=https://github.com/kubernetes/kubernetes
|
||||
Requires=setup-network-environment.service
|
||||
After=setup-network-environment.service
|
||||
[Service]
|
||||
@@ -595,7 +595,7 @@ On the PXE server make and fill in the variables `vi /var/www/html/coreos/pxe-cl
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Kubernetes Kubelet
|
||||
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
|
||||
Documentation=https://github.com/kubernetes/kubernetes
|
||||
Requires=setup-network-environment.service
|
||||
After=setup-network-environment.service
|
||||
[Service]
|
||||
|
||||
@@ -74,6 +74,14 @@ This pattern is necessary because the `flannel` daemon is responsible for settin
|
||||
all of the Docker containers created by Kubernetes. To achieve this, it must run outside of the _main_ Docker daemon. However,
|
||||
it is still useful to use containers for deployment and management, so we create a simpler _bootstrap_ daemon to achieve this.
|
||||
|
||||
You can specify k8s version on very node before install:
|
||||
|
||||
```
|
||||
export K8S_VERSION=<your_k8s_version (e.g. 1.0.3)>
|
||||
```
|
||||
|
||||
Otherwise, we'll use latest `hyperkube` image as default k8s version.
|
||||
|
||||
## Master Node
|
||||
|
||||
The first step in the process is to initialize the master node.
|
||||
@@ -81,7 +89,6 @@ The first step in the process is to initialize the master node.
|
||||
Clone the Kubernetes repo, and run [master.sh](docker-multinode/master.sh) on the master machine with root:
|
||||
|
||||
```sh
|
||||
export K8S_VERSION=<your_k8s_version (e.g. 1.0.1)>
|
||||
cd kubernetes/docs/getting-started-guides/docker-multinode/
|
||||
./master.sh
|
||||
```
|
||||
@@ -97,7 +104,6 @@ Once your master is up and running you can add one or more workers on different
|
||||
Clone the Kubernetes repo, and run [worker.sh](docker-multinode/worker.sh) on the worker machine with root:
|
||||
|
||||
```sh
|
||||
export K8S_VERSION=<your_k8s_version (e.g. 1.0.1)>
|
||||
export MASTER_IP=<your_master_ip (e.g. 1.2.3.4)>
|
||||
cd kubernetes/docs/getting-started-guides/docker-multinode/
|
||||
./worker.sh
|
||||
|
||||
@@ -193,7 +193,7 @@ NAME LABELS STATUS
|
||||
```
|
||||
|
||||
If the status of the node is `NotReady` or `Unknown` please check that all of the containers you created are successfully running.
|
||||
If all else fails, ask questions on IRC at [#google-containers](http://webchat.freenode.net/?channels=google-containers).
|
||||
If all else fails, ask questions on [Slack](../../troubleshooting.md#slack).
|
||||
|
||||
|
||||
### Next steps
|
||||
|
||||
@@ -27,8 +27,8 @@ fi
|
||||
|
||||
# Make sure k8s version env is properly set
|
||||
if [ -z ${K8S_VERSION} ]; then
|
||||
echo "Please export K8S_VERSION in your env"
|
||||
exit 1
|
||||
K8S_VERSION="1.0.3"
|
||||
echo "K8S_VERSION is not set, using default: ${K8S_VERSION}"
|
||||
else
|
||||
echo "k8s version is set to: ${K8S_VERSION}"
|
||||
fi
|
||||
@@ -135,8 +135,32 @@ start_k8s(){
|
||||
sleep 5
|
||||
|
||||
# Start kubelet & proxy, then start master components as pods
|
||||
docker run --net=host --privileged --restart=always -d -v /sys:/sys:ro -v /var/run/docker.sock:/var/run/docker.sock gcr.io/google_containers/hyperkube:v${K8S_VERSION} /hyperkube kubelet --api-servers=http://localhost:8080 --v=2 --address=0.0.0.0 --enable-server --hostname-override=127.0.0.1 --config=/etc/kubernetes/manifests-multi --cluster-dns=10.0.0.10 --cluster-domain=cluster.local
|
||||
docker run -d --net=host --privileged gcr.io/google_containers/hyperkube:v${K8S_VERSION} /hyperkube proxy --master=http://127.0.0.1:8080 --v=2
|
||||
docker run \
|
||||
--net=host \
|
||||
--privileged \
|
||||
--restart=always \
|
||||
-d \
|
||||
-v /sys:/sys:ro \
|
||||
-v /var/run:/var/run:rw \
|
||||
-v /:/rootfs:ro \
|
||||
-v /dev:/dev \
|
||||
-v /var/lib/docker/:/var/lib/docker:ro \
|
||||
-v /var/lib/kubelet/:/var/lib/kubelet:rw \
|
||||
gcr.io/google_containers/hyperkube:v${K8S_VERSION} \
|
||||
/hyperkube kubelet \
|
||||
--api-servers=http://localhost:8080 \
|
||||
--v=2 --address=0.0.0.0 --enable-server \
|
||||
--hostname-override=127.0.0.1 \
|
||||
--config=/etc/kubernetes/manifests-multi \
|
||||
--cluster-dns=10.0.0.10 \
|
||||
--cluster-domain=cluster.local
|
||||
|
||||
docker run \
|
||||
-d \
|
||||
--net=host \
|
||||
--privileged \
|
||||
gcr.io/google_containers/hyperkube:v${K8S_VERSION} \
|
||||
/hyperkube proxy --master=http://127.0.0.1:8080 --v=2
|
||||
}
|
||||
|
||||
echo "Detecting your OS distro ..."
|
||||
|
||||
@@ -47,8 +47,7 @@ NAME LABELS STATUS
|
||||
127.0.0.1 kubernetes.io/hostname=127.0.0.1 Ready
|
||||
```
|
||||
|
||||
If the status of any node is `Unknown` or `NotReady` your cluster is broken, double check that all containers are running properly, and if all else fails, contact us on IRC at
|
||||
[`#google-containers`](http://webchat.freenode.net/?channels=google-containers) for advice.
|
||||
If the status of any node is `Unknown` or `NotReady` your cluster is broken, double check that all containers are running properly, and if all else fails, contact us on [Slack](../../troubleshooting.md#slack).
|
||||
|
||||
### Run an application
|
||||
|
||||
|
||||
@@ -27,13 +27,14 @@ fi
|
||||
|
||||
# Make sure k8s version env is properly set
|
||||
if [ -z ${K8S_VERSION} ]; then
|
||||
echo "Please export K8S_VERSION in your env"
|
||||
exit 1
|
||||
K8S_VERSION="1.0.3"
|
||||
echo "K8S_VERSION is not set, using default: ${K8S_VERSION}"
|
||||
else
|
||||
echo "k8s version is set to: ${K8S_VERSION}"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Run as root
|
||||
if [ "$(id -u)" != "0" ]; then
|
||||
echo >&2 "Please run as root"
|
||||
@@ -133,8 +134,31 @@ start_k8s() {
|
||||
sleep 5
|
||||
|
||||
# Start kubelet & proxy in container
|
||||
sudo docker run --net=host --privileged --restart=always -d -v /sys:/sys:ro -v /var/run/docker.sock:/var/run/docker.sock gcr.io/google_containers/hyperkube:v${K8S_VERSION} /hyperkube kubelet --api-servers=http://${MASTER_IP}:8080 --v=2 --address=0.0.0.0 --enable-server --hostname-override=$(hostname -i) --cluster-dns=10.0.0.10 --cluster-domain=cluster.local
|
||||
sudo docker run -d --net=host --privileged --restart=always gcr.io/google_containers/hyperkube:v${K8S_VERSION} /hyperkube proxy --master=http://${MASTER_IP}:8080 --v=2
|
||||
docker run \
|
||||
--net=host \
|
||||
--privileged \
|
||||
--restart=always \
|
||||
-d \
|
||||
-v /sys:/sys:ro \
|
||||
-v /var/run:/var/run:rw \
|
||||
-v /dev:/dev \
|
||||
-v /var/lib/docker/:/var/lib/docker:ro \
|
||||
-v /var/lib/kubelet/:/var/lib/kubelet:rw \
|
||||
gcr.io/google_containers/hyperkube:v${K8S_VERSION} \
|
||||
/hyperkube kubelet --api-servers=http://${MASTER_IP}:8080 \
|
||||
--v=2 --address=0.0.0.0 --enable-server \
|
||||
--hostname-override=$(hostname -i) \
|
||||
--cluster-dns=10.0.0.10 \
|
||||
--cluster-domain=cluster.local
|
||||
|
||||
docker run \
|
||||
-d \
|
||||
--net=host \
|
||||
--privileged \
|
||||
--restart=always \
|
||||
gcr.io/google_containers/hyperkube:v${K8S_VERSION} \
|
||||
/hyperkube proxy --master=http://${MASTER_IP}:8080 \
|
||||
--v=2
|
||||
}
|
||||
|
||||
echo "Detecting your OS distro ..."
|
||||
|
||||
@@ -90,7 +90,7 @@ By default, some containers will already be running on your cluster. Containers
|
||||
|
||||
The script run by the commands above creates a cluster with the name/prefix "kubernetes". It defines one specific cluster config, so you can't run it more than once.
|
||||
|
||||
Alternately, you can download and install the latest Kubernetes release from [this page](https://github.com/GoogleCloudPlatform/kubernetes/releases), then run the `<kubernetes>/cluster/kube-up.sh` script to start the cluster:
|
||||
Alternately, you can download and install the latest Kubernetes release from [this page](https://github.com/kubernetes/kubernetes/releases), then run the `<kubernetes>/cluster/kube-up.sh` script to start the cluster:
|
||||
|
||||
```bash
|
||||
cd kubernetes
|
||||
@@ -100,7 +100,7 @@ cluster/kube-up.sh
|
||||
If you want more than one cluster running in your project, want to use a different name, or want a different number of worker nodes, see the `<kubernetes>/cluster/gce/config-default.sh` file for more fine-grained configuration before you start up your cluster.
|
||||
|
||||
If you run into trouble, please see the section on [troubleshooting](gce.md#troubleshooting), post to the
|
||||
[google-containers group](https://groups.google.com/forum/#!forum/google-containers), or come ask questions on IRC at [#google-containers](http://webchat.freenode.net/?channels=google-containers) on freenode.
|
||||
[google-containers group](https://groups.google.com/forum/#!forum/google-containers), or come ask questions on [Slack](../troubleshooting.md#slack).
|
||||
|
||||
The next few steps will show you:
|
||||
|
||||
|
||||
@@ -151,12 +151,12 @@ host machine (mac).
|
||||
1. Checkout source
|
||||
|
||||
```
|
||||
git clone https://github.com/GoogleCloudPlatform/kubernetes
|
||||
git clone https://github.com/kubernetes/kubernetes
|
||||
cd kubernetes
|
||||
```
|
||||
|
||||
By default, that will get you the bleeding edge of master branch.
|
||||
You may want a [release branch](https://github.com/GoogleCloudPlatform/kubernetes/releases) instead,
|
||||
You may want a [release branch](https://github.com/kubernetes/kubernetes/releases) instead,
|
||||
if you have trouble with master.
|
||||
|
||||
1. Build binaries
|
||||
|
||||
@@ -85,7 +85,7 @@ ssh jclouds@${ip_address_of_master_node}
|
||||
Build Kubernetes-Mesos.
|
||||
|
||||
```bash
|
||||
git clone https://github.com/GoogleCloudPlatform/kubernetes
|
||||
git clone https://github.com/kubernetes/kubernetes
|
||||
cd kubernetes
|
||||
export KUBERNETES_CONTRIB=mesos
|
||||
make
|
||||
|
||||
@@ -79,6 +79,7 @@ The current cluster design is inspired by:
|
||||
## Cluster
|
||||
|
||||
There is a specific `cluster/rackspace` directory with the scripts for the following steps:
|
||||
|
||||
1. A cloud network will be created and all instances will be attached to this network.
|
||||
- flanneld uses this network for next hop routing. These routes allow the containers running on each node to communicate with one another on this private network.
|
||||
2. A SSH key will be created and uploaded if needed. This key must be used to ssh into the machines (we do not capture the password).
|
||||
@@ -91,9 +92,9 @@ There is a specific `cluster/rackspace` directory with the scripts for the follo
|
||||
- A number of the items in `config-default.sh` are overridable via environment variables.
|
||||
- For older versions please either:
|
||||
* Sync back to `v0.9` with `git checkout v0.9`
|
||||
* Download a [snapshot of `v0.9`](https://github.com/GoogleCloudPlatform/kubernetes/archive/v0.9.tar.gz)
|
||||
* Download a [snapshot of `v0.9`](https://github.com/kubernetes/kubernetes/archive/v0.9.tar.gz)
|
||||
* Sync back to `v0.3` with `git checkout v0.3`
|
||||
* Download a [snapshot of `v0.3`](https://github.com/GoogleCloudPlatform/kubernetes/archive/v0.3.tar.gz)
|
||||
* Download a [snapshot of `v0.3`](https://github.com/kubernetes/kubernetes/archive/v0.3.tar.gz)
|
||||
|
||||
## Network Design
|
||||
|
||||
|
||||
@@ -212,7 +212,7 @@ A Kubernetes binary release includes all the Kubernetes binaries as well as the
|
||||
You can use a Kubernetes binary release (recommended) or build your Kubernetes binaries following the instructions in the
|
||||
[Developer Documentation](../devel/README.md). Only using a binary release is covered in this guide.
|
||||
|
||||
Download the [latest binary release](https://github.com/GoogleCloudPlatform/kubernetes/releases/latest) and unzip it.
|
||||
Download the [latest binary release](https://github.com/kubernetes/kubernetes/releases/latest) and unzip it.
|
||||
Then locate `./kubernetes/server/kubernetes-server-linux-amd64.tar.gz` and unzip *that*.
|
||||
Then, within the second set of unzipped files, locate `./kubernetes/server/bin`, which contains
|
||||
all the necessary binaries.
|
||||
@@ -226,7 +226,7 @@ we recommend that you run these as containers, so you need an image to be built.
|
||||
You have several choices for Kubernetes images:
|
||||
- Use images hosted on Google Container Registry (GCR):
|
||||
- e.g `gcr.io/google_containers/hyperkube:$TAG`, where `TAG` is the latest
|
||||
release tag, which can be found on the [latest releases page](https://github.com/GoogleCloudPlatform/kubernetes/releases/latest).
|
||||
release tag, which can be found on the [latest releases page](https://github.com/kubernetes/kubernetes/releases/latest).
|
||||
- Ensure $TAG is the same tag as the release tag you are using for kubelet and kube-proxy.
|
||||
- The [hyperkube](../../cmd/hyperkube/) binary is an all in one binary
|
||||
- `hyperkube kubelet ...` runs the kublet, `hyperkube apiserver ...` runs an apiserver, etc.
|
||||
@@ -875,7 +875,7 @@ pinging or SSH-ing from one node to another.
|
||||
### Getting Help
|
||||
|
||||
If you run into trouble, please see the section on [troubleshooting](gce.md#troubleshooting), post to the
|
||||
[google-containers group](https://groups.google.com/forum/#!forum/google-containers), or come ask questions on IRC at [#google-containers](http://webchat.freenode.net/?channels=google-containers) on freenode.
|
||||
[google-containers group](https://groups.google.com/forum/#!forum/google-containers), or come ask questions on [Slack](../troubleshooting.md#slack).
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -35,7 +35,7 @@ Kubernetes Deployment On Bare-metal Ubuntu Nodes with Calico Networking
|
||||
|
||||
## Introduction
|
||||
|
||||
This document describes how to deploy Kubernetes on ubuntu bare metal nodes with Calico Networking plugin. See [projectcalico.org](http://projectcalico.org) for more information on what Calico is, and [the calicoctl github](https://github.com/projectcalico/calico-docker) for more information on the command-line tool, `calicoctl`.
|
||||
This document describes how to deploy Kubernetes on Ubuntu bare metal nodes with Calico Networking plugin. See [projectcalico.org](http://projectcalico.org) for more information on what Calico is, and [the calicoctl github](https://github.com/projectcalico/calico-docker) for more information on the command-line tool, `calicoctl`.
|
||||
|
||||
This guide will set up a simple Kubernetes cluster with a master and two nodes. We will start the following processes with systemd:
|
||||
|
||||
@@ -54,7 +54,8 @@ On each Node:
|
||||
## Prerequisites
|
||||
|
||||
1. This guide uses `systemd` and thus uses Ubuntu 15.04 which supports systemd natively.
|
||||
2. All Kubernetes nodes should have the latest docker stable version installed. At the time of writing, that is Docker 1.7.0.
|
||||
2. All machines should have the latest docker stable version installed. At the time of writing, that is Docker 1.7.0.
|
||||
- To install docker, follow [these instructions](https://docs.docker.com/installation/ubuntulinux/)
|
||||
3. All hosts should be able to communicate with each other, as well as the internet, to download the necessary files.
|
||||
4. This demo assumes that none of the hosts have been configured with any Kubernetes or Calico software yet.
|
||||
|
||||
@@ -122,8 +123,6 @@ sudo systemctl start kube-controller-manager.service
|
||||
sudo systemctl start kube-scheduler.service
|
||||
```
|
||||
|
||||
> *You may want to consider checking their status after to ensure everything is running.*
|
||||
|
||||
### Install Calico on Master
|
||||
|
||||
In order to allow the master to route to pods on our nodes, we will launch the calico-node daemon on our master. This will allow it to learn routes over BGP from the other calico-node daemons in the cluster. The docker daemon should already be running before calico is started.
|
||||
@@ -176,6 +175,7 @@ sudo mv -f network-environment /etc
|
||||
Instead of using docker's default interface (docker0), we will configure a new one to use desired IP ranges
|
||||
|
||||
```
|
||||
sudo apt-get install -y bridge-utils
|
||||
sudo brctl addbr cbr0
|
||||
sudo ifconfig cbr0 up
|
||||
sudo ifconfig cbr0 <IP>/24
|
||||
@@ -197,9 +197,12 @@ The Docker daemon must be started and told to use the already configured cbr0 in
|
||||
|
||||
2.) Find the line that reads `ExecStart=/usr/bin/docker -d -H fd://` and append the following flags: `--bridge=cbr0 --iptables=false --ip-masq=false`
|
||||
|
||||
3.) Reload systemctl with `sudo systemctl daemon-reload`
|
||||
3.) Reload systemctl and restart docker.
|
||||
|
||||
4.) Restart docker with with `sudo systemctl restart docker`
|
||||
```
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl restart docker
|
||||
```
|
||||
|
||||
### Install Calico on the Node
|
||||
|
||||
@@ -241,6 +244,10 @@ kubernetes/cluster/ubuntu/build.sh
|
||||
|
||||
# Add binaries to /usr/bin
|
||||
sudo cp -f binaries/minion/* /usr/bin
|
||||
|
||||
# Get the iptables based kube-proxy reccomended for this demo
|
||||
sudo wget https://github.com/projectcalico/calico-kubernetes/releases/download/v0.1.1/kube-proxy -P /usr/bin/
|
||||
sudo chmod +x /usr/bin/kube-proxy
|
||||
```
|
||||
|
||||
2.) Install and launch the sample systemd processes settings for launching Kubernetes services
|
||||
@@ -256,6 +263,14 @@ sudo systemctl start kube-kubelet.service
|
||||
|
||||
>*You may want to consider checking their status after to ensure everything is running*
|
||||
|
||||
## Install the DNS Addon
|
||||
|
||||
Most Kubernetes deployments will require the DNS addon for service discovery. For more on DNS service discovery, check [here](../../cluster/addons/dns/).
|
||||
|
||||
The config repository for this guide comes with manifest files to start the DNS addon. To install DNS, do the following on your Master node.
|
||||
|
||||
Replace `<MASTER_IP>` in `calico-kubernetes-ubuntu-demo-master/dns/skydns-rc.yaml` with your Master's IP address. Then, create `skydns-rc.yaml` and `skydns-svc.yaml` using `kubectl create -f <FILE>`.
|
||||
|
||||
## Launch other Services With Calico-Kubernetes
|
||||
|
||||
At this point, you have a fully functioning cluster running on kubernetes with a master and 2 nodes networked with Calico. You can now follow any of the [standard documentation](../../examples/) to set up other services on your cluster.
|
||||
@@ -268,12 +283,15 @@ With this sample configuration, because the containers have private `192.168.0.0
|
||||
|
||||
The simplest method for enabling connectivity from containers to the internet is to use an iptables masquerade rule. This is the standard mechanism [recommended](../../docs/admin/networking.md#google-compute-engine-gce) in the Kubernetes GCE environment.
|
||||
|
||||
We need to NAT traffic that has a destination outside of the cluster. Internal traffic includes the master/nodes, and the container IP pools. Assuming that the master and nodes are in the `172.25.0.0/24` subnet, the cbr0 IP ranges are all in the `192.168.0.0/16` network, and the nodes use the interface `eth0` for external connectivity, a suitable masquerade chain would look like this:
|
||||
We need to NAT traffic that has a destination outside of the cluster. Internal traffic includes the master/nodes, and the container IP pools. A suitable masquerade chain would follow the pattern below, replacing the following variables:
|
||||
- `CONTAINER_SUBNET`: The cluster-wide subnet from which container IPs are chosen. All cbr0 bridge subnets fall within this range. The above example uses `192.168.0.0/16`.
|
||||
- `KUBERNETES_HOST_SUBNET`: The subnet from which Kubernetes node / master IP addresses have been chosen.
|
||||
- `HOST_INTERFACE`: The interface on the Kubernetes node which is used for external connectivity. The above example uses `eth0`
|
||||
|
||||
```
|
||||
sudo iptables -t nat -N KUBE-OUTBOUND-NAT
|
||||
sudo iptables -t nat -A KUBE-OUTBOUND-NAT -d 192.168.0.0/16 -o eth0 -j RETURN
|
||||
sudo iptables -t nat -A KUBE-OUTBOUND-NAT -d 172.25.0.0/24 -o eth0 -j RETURN
|
||||
sudo iptables -t nat -A KUBE-OUTBOUND-NAT -d <CONTAINER_SUBNET> -o <HOST_INTERFACE> -j RETURN
|
||||
sudo iptables -t nat -A KUBE-OUTBOUND-NAT -d <KUBERNETES_HOST_SUBNET> -o <HOST_INTERFACE> -j RETURN
|
||||
sudo iptables -t nat -A KUBE-OUTBOUND-NAT -j MASQUERADE
|
||||
sudo iptables -t nat -A POSTROUTING -j KUBE-OUTBOUND-NAT
|
||||
```
|
||||
|
||||
@@ -69,7 +69,7 @@ Ubuntu 15 which use systemd instead of upstart. We are working around fixing thi
|
||||
First clone the kubernetes github repo
|
||||
|
||||
``` console
|
||||
$ git clone https://github.com/GoogleCloudPlatform/kubernetes.git
|
||||
$ git clone https://github.com/kubernetes/kubernetes.git
|
||||
```
|
||||
|
||||
Then download all the needed binaries into given directory (cluster/ubuntu/binaries)
|
||||
|
||||
@@ -72,7 +72,7 @@ export KUBERNETES_PROVIDER=vagrant
|
||||
curl -sS https://get.k8s.io | bash
|
||||
```
|
||||
|
||||
Alternatively, you can download [Kubernetes release](https://github.com/GoogleCloudPlatform/kubernetes/releases) and extract the archive. To start your local cluster, open a shell and run:
|
||||
Alternatively, you can download [Kubernetes release](https://github.com/kubernetes/kubernetes/releases) and extract the archive. To start your local cluster, open a shell and run:
|
||||
|
||||
```sh
|
||||
cd kubernetes
|
||||
|
||||
@@ -37,10 +37,6 @@ resourcequotas (quota) or secrets.
|
||||
\fB\-f\fP, \fB\-\-filename\fP=[]
|
||||
Filename, directory, or URL to a file identifying the resource to update the annotation
|
||||
|
||||
.PP
|
||||
\fB\-h\fP, \fB\-\-help\fP=false
|
||||
help for annotate
|
||||
|
||||
.PP
|
||||
\fB\-\-overwrite\fP=false
|
||||
If true, allow annotations to be overwritten, otherwise reject annotation updates that overwrite existing annotations.
|
||||
|
||||
@@ -16,12 +16,6 @@ kubectl api\-versions \- Print available API versions.
|
||||
Print available API versions.
|
||||
|
||||
|
||||
.SH OPTIONS
|
||||
.PP
|
||||
\fB\-h\fP, \fB\-\-help\fP=false
|
||||
help for api\-versions
|
||||
|
||||
|
||||
.SH OPTIONS INHERITED FROM PARENT COMMANDS
|
||||
.PP
|
||||
\fB\-\-alsologtostderr\fP=false
|
||||
|
||||
@@ -21,10 +21,6 @@ Attach to a a process that is already running inside an existing container.
|
||||
\fB\-c\fP, \fB\-\-container\fP=""
|
||||
Container name
|
||||
|
||||
.PP
|
||||
\fB\-h\fP, \fB\-\-help\fP=false
|
||||
help for attach
|
||||
|
||||
.PP
|
||||
\fB\-i\fP, \fB\-\-stdin\fP=false
|
||||
Pass stdin to the container
|
||||
|
||||
@@ -16,12 +16,6 @@ kubectl cluster\-info \- Display cluster info
|
||||
Display addresses of the master and services with label kubernetes.io/cluster\-service=true
|
||||
|
||||
|
||||
.SH OPTIONS
|
||||
.PP
|
||||
\fB\-h\fP, \fB\-\-help\fP=false
|
||||
help for cluster\-info
|
||||
|
||||
|
||||
.SH OPTIONS INHERITED FROM PARENT COMMANDS
|
||||
.PP
|
||||
\fB\-\-alsologtostderr\fP=false
|
||||
|
||||
@@ -30,10 +30,6 @@ Specifying a name that already exists will merge new fields on top of existing v
|
||||
\fB\-\-embed\-certs\fP=false
|
||||
embed\-certs for the cluster entry in kubeconfig
|
||||
|
||||
.PP
|
||||
\fB\-h\fP, \fB\-\-help\fP=false
|
||||
help for set\-cluster
|
||||
|
||||
.PP
|
||||
\fB\-\-insecure\-skip\-tls\-verify\fP=false
|
||||
insecure\-skip\-tls\-verify for the cluster entry in kubeconfig
|
||||
|
||||
@@ -22,10 +22,6 @@ Specifying a name that already exists will merge new fields on top of existing v
|
||||
\fB\-\-cluster\fP=""
|
||||
cluster for the context entry in kubeconfig
|
||||
|
||||
.PP
|
||||
\fB\-h\fP, \fB\-\-help\fP=false
|
||||
help for set\-context
|
||||
|
||||
.PP
|
||||
\fB\-\-namespace\fP=""
|
||||
namespace for the context entry in kubeconfig
|
||||
|
||||
@@ -45,10 +45,6 @@ Bearer token and basic auth are mutually exclusive.
|
||||
\fB\-\-embed\-certs\fP=false
|
||||
embed client cert/key for the user entry in kubeconfig
|
||||
|
||||
.PP
|
||||
\fB\-h\fP, \fB\-\-help\fP=false
|
||||
help for set\-credentials
|
||||
|
||||
.PP
|
||||
\fB\-\-password\fP=""
|
||||
password for the user entry in kubeconfig
|
||||
|
||||
@@ -18,12 +18,6 @@ PROPERTY\_NAME is a dot delimited name where each token represents either a attr
|
||||
PROPERTY\_VALUE is the new value you wish to set.
|
||||
|
||||
|
||||
.SH OPTIONS
|
||||
.PP
|
||||
\fB\-h\fP, \fB\-\-help\fP=false
|
||||
help for set
|
||||
|
||||
|
||||
.SH OPTIONS INHERITED FROM PARENT COMMANDS
|
||||
.PP
|
||||
\fB\-\-alsologtostderr\fP=false
|
||||
|
||||
@@ -17,12 +17,6 @@ Unsets an individual value in a kubeconfig file
|
||||
PROPERTY\_NAME is a dot delimited name where each token represents either a attribute name or a map key. Map keys may not contain dots.
|
||||
|
||||
|
||||
.SH OPTIONS
|
||||
.PP
|
||||
\fB\-h\fP, \fB\-\-help\fP=false
|
||||
help for unset
|
||||
|
||||
|
||||
.SH OPTIONS INHERITED FROM PARENT COMMANDS
|
||||
.PP
|
||||
\fB\-\-alsologtostderr\fP=false
|
||||
|
||||
@@ -16,12 +16,6 @@ kubectl config use\-context \- Sets the current\-context in a kubeconfig file
|
||||
Sets the current\-context in a kubeconfig file
|
||||
|
||||
|
||||
.SH OPTIONS
|
||||
.PP
|
||||
\fB\-h\fP, \fB\-\-help\fP=false
|
||||
help for use\-context
|
||||
|
||||
|
||||
.SH OPTIONS INHERITED FROM PARENT COMMANDS
|
||||
.PP
|
||||
\fB\-\-alsologtostderr\fP=false
|
||||
|
||||
@@ -24,10 +24,6 @@ You can use \-\-output=template \-\-template=TEMPLATE to extract specific values
|
||||
\fB\-\-flatten\fP=false
|
||||
flatten the resulting kubeconfig file into self contained output (useful for creating portable kubeconfig files)
|
||||
|
||||
.PP
|
||||
\fB\-h\fP, \fB\-\-help\fP=false
|
||||
help for view
|
||||
|
||||
.PP
|
||||
\fB\-\-merge\fP=true
|
||||
merge together the full hierarchy of kubeconfig files
|
||||
@@ -42,7 +38,9 @@ You can use \-\-output=template \-\-template=TEMPLATE to extract specific values
|
||||
|
||||
.PP
|
||||
\fB\-o\fP, \fB\-\-output\fP=""
|
||||
Output format. One of: json|yaml|template|templatefile|wide|jsonpath|name.
|
||||
Output format. One of: json|yaml|wide|name|go\-template=...|go\-template\-file=...|jsonpath=...|jsonpath\-file=... See golang template [
|
||||
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]] and jsonpath template [
|
||||
\[la]http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md\[ra]].
|
||||
|
||||
.PP
|
||||
\fB\-\-output\-version\fP=""
|
||||
@@ -62,9 +60,8 @@ You can use \-\-output=template \-\-template=TEMPLATE to extract specific values
|
||||
|
||||
.PP
|
||||
\fB\-t\fP, \fB\-\-template\fP=""
|
||||
Template string or path to template file to use when \-o=template, \-o=templatefile or \-o=jsonpath. The template format is golang templates [
|
||||
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]. The jsonpath template is composed of jsonpath expressions enclosed by {} [
|
||||
\[la]http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md\[ra]]
|
||||
Template string or path to template file to use when \-o=go\-template, \-o=go\-template\-file. The template format is golang templates [
|
||||
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]].
|
||||
|
||||
|
||||
.SH OPTIONS INHERITED FROM PARENT COMMANDS
|
||||
|
||||
@@ -23,10 +23,6 @@ The loading order follows these rules:
|
||||
|
||||
|
||||
.SH OPTIONS
|
||||
.PP
|
||||
\fB\-h\fP, \fB\-\-help\fP=false
|
||||
help for config
|
||||
|
||||
.PP
|
||||
\fB\-\-kubeconfig\fP=""
|
||||
use a particular kubeconfig file
|
||||
|
||||
@@ -24,10 +24,6 @@ JSON and YAML formats are accepted.
|
||||
\fB\-f\fP, \fB\-\-filename\fP=[]
|
||||
Filename, directory, or URL to file to use to create the resource
|
||||
|
||||
.PP
|
||||
\fB\-h\fP, \fB\-\-help\fP=false
|
||||
help for create
|
||||
|
||||
.PP
|
||||
\fB\-o\fP, \fB\-\-output\fP=""
|
||||
Output mode. Use "\-o name" for shorter output (resource/name).
|
||||
|
||||
@@ -44,10 +44,6 @@ will be lost along with the rest of the resource.
|
||||
\fB\-\-grace\-period\fP=\-1
|
||||
Period of time in seconds given to the resource to terminate gracefully. Ignored if negative.
|
||||
|
||||
.PP
|
||||
\fB\-h\fP, \fB\-\-help\fP=false
|
||||
help for delete
|
||||
|
||||
.PP
|
||||
\fB\-\-ignore\-not\-found\fP=false
|
||||
Treat "resource not found" as a successful delete. Defaults to "true" when \-\-all is specified.
|
||||
|
||||
@@ -38,10 +38,6 @@ namespaces (ns) or secrets.
|
||||
\fB\-f\fP, \fB\-\-filename\fP=[]
|
||||
Filename, directory, or URL to a file containing the resource to describe
|
||||
|
||||
.PP
|
||||
\fB\-h\fP, \fB\-\-help\fP=false
|
||||
help for describe
|
||||
|
||||
.PP
|
||||
\fB\-l\fP, \fB\-\-selector\fP=""
|
||||
Selector (label query) to filter on
|
||||
|
||||
@@ -21,10 +21,6 @@ Execute a command in a container.
|
||||
\fB\-c\fP, \fB\-\-container\fP=""
|
||||
Container name. If omitted, the first container in the pod will be chosen
|
||||
|
||||
.PP
|
||||
\fB\-h\fP, \fB\-\-help\fP=false
|
||||
help for exec
|
||||
|
||||
.PP
|
||||
\fB\-p\fP, \fB\-\-pod\fP=""
|
||||
Pod name
|
||||
|
||||
@@ -46,10 +46,6 @@ re\-use the labels from the resource it exposes.
|
||||
\fB\-\-generator\fP="service/v2"
|
||||
The name of the API generator to use. There are 2 generators: 'service/v1' and 'service/v2'. The only difference between them is that service port in v1 is named 'default', while it is left unnamed in v2. Default is 'service/v2'.
|
||||
|
||||
.PP
|
||||
\fB\-h\fP, \fB\-\-help\fP=false
|
||||
help for expose
|
||||
|
||||
.PP
|
||||
\fB\-l\fP, \fB\-\-labels\fP=""
|
||||
Labels to apply to the service created by this call.
|
||||
@@ -64,7 +60,9 @@ re\-use the labels from the resource it exposes.
|
||||
|
||||
.PP
|
||||
\fB\-o\fP, \fB\-\-output\fP=""
|
||||
Output format. One of: json|yaml|template|templatefile|wide|jsonpath|name.
|
||||
Output format. One of: json|yaml|wide|name|go\-template=...|go\-template\-file=...|jsonpath=...|jsonpath\-file=... See golang template [
|
||||
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]] and jsonpath template [
|
||||
\[la]http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md\[ra]].
|
||||
|
||||
.PP
|
||||
\fB\-\-output\-version\fP=""
|
||||
@@ -104,9 +102,8 @@ re\-use the labels from the resource it exposes.
|
||||
|
||||
.PP
|
||||
\fB\-t\fP, \fB\-\-template\fP=""
|
||||
Template string or path to template file to use when \-o=template, \-o=templatefile or \-o=jsonpath. The template format is golang templates [
|
||||
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]. The jsonpath template is composed of jsonpath expressions enclosed by {} [
|
||||
\[la]http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md\[ra]]
|
||||
Template string or path to template file to use when \-o=go\-template, \-o=go\-template\-file. The template format is golang templates [
|
||||
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]].
|
||||
|
||||
.PP
|
||||
\fB\-\-type\fP=""
|
||||
|
||||
@@ -35,10 +35,6 @@ of the \-\-template flag, you can filter the attributes of the fetched resource(
|
||||
\fB\-f\fP, \fB\-\-filename\fP=[]
|
||||
Filename, directory, or URL to a file identifying the resource to get from a server.
|
||||
|
||||
.PP
|
||||
\fB\-h\fP, \fB\-\-help\fP=false
|
||||
help for get
|
||||
|
||||
.PP
|
||||
\fB\-L\fP, \fB\-\-label\-columns\fP=[]
|
||||
Accepts a comma separated list of labels that are going to be presented as columns. Names are case\-sensitive. You can also use multiple flag statements like \-L label1 \-L label2...
|
||||
@@ -49,7 +45,9 @@ of the \-\-template flag, you can filter the attributes of the fetched resource(
|
||||
|
||||
.PP
|
||||
\fB\-o\fP, \fB\-\-output\fP=""
|
||||
Output format. One of: json|yaml|template|templatefile|wide|jsonpath|name.
|
||||
Output format. One of: json|yaml|wide|name|go\-template=...|go\-template\-file=...|jsonpath=...|jsonpath\-file=... See golang template [
|
||||
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]] and jsonpath template [
|
||||
\[la]http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md\[ra]].
|
||||
|
||||
.PP
|
||||
\fB\-\-output\-version\fP=""
|
||||
@@ -69,9 +67,8 @@ of the \-\-template flag, you can filter the attributes of the fetched resource(
|
||||
|
||||
.PP
|
||||
\fB\-t\fP, \fB\-\-template\fP=""
|
||||
Template string or path to template file to use when \-o=template, \-o=templatefile or \-o=jsonpath. The template format is golang templates [
|
||||
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]. The jsonpath template is composed of jsonpath expressions enclosed by {} [
|
||||
\[la]http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md\[ra]]
|
||||
Template string or path to template file to use when \-o=go\-template, \-o=go\-template\-file. The template format is golang templates [
|
||||
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]].
|
||||
|
||||
.PP
|
||||
\fB\-w\fP, \fB\-\-watch\fP=false
|
||||
|
||||
@@ -27,12 +27,12 @@ If \-\-resource\-version is specified, then updates will use this resource versi
|
||||
select all resources in the namespace of the specified resource types
|
||||
|
||||
.PP
|
||||
\fB\-f\fP, \fB\-\-filename\fP=[]
|
||||
Filename, directory, or URL to a file identifying the resource to update the labels
|
||||
\fB\-\-dry\-run\fP=false
|
||||
If true, only print the object that would be sent, without sending it.
|
||||
|
||||
.PP
|
||||
\fB\-h\fP, \fB\-\-help\fP=false
|
||||
help for label
|
||||
\fB\-f\fP, \fB\-\-filename\fP=[]
|
||||
Filename, directory, or URL to a file identifying the resource to update the labels
|
||||
|
||||
.PP
|
||||
\fB\-\-no\-headers\fP=false
|
||||
@@ -40,7 +40,9 @@ If \-\-resource\-version is specified, then updates will use this resource versi
|
||||
|
||||
.PP
|
||||
\fB\-o\fP, \fB\-\-output\fP=""
|
||||
Output format. One of: json|yaml|template|templatefile|wide|jsonpath|name.
|
||||
Output format. One of: json|yaml|wide|name|go\-template=...|go\-template\-file=...|jsonpath=...|jsonpath\-file=... See golang template [
|
||||
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]] and jsonpath template [
|
||||
\[la]http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md\[ra]].
|
||||
|
||||
.PP
|
||||
\fB\-\-output\-version\fP=""
|
||||
@@ -68,9 +70,8 @@ If \-\-resource\-version is specified, then updates will use this resource versi
|
||||
|
||||
.PP
|
||||
\fB\-t\fP, \fB\-\-template\fP=""
|
||||
Template string or path to template file to use when \-o=template, \-o=templatefile or \-o=jsonpath. The template format is golang templates [
|
||||
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]. The jsonpath template is composed of jsonpath expressions enclosed by {} [
|
||||
\[la]http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md\[ra]]
|
||||
Template string or path to template file to use when \-o=go\-template, \-o=go\-template\-file. The template format is golang templates [
|
||||
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]].
|
||||
|
||||
|
||||
.SH OPTIONS INHERITED FROM PARENT COMMANDS
|
||||
|
||||
@@ -25,10 +25,6 @@ Print the logs for a container in a pod. If the pod has only one container, the
|
||||
\fB\-f\fP, \fB\-\-follow\fP=false
|
||||
Specify if the logs should be streamed.
|
||||
|
||||
.PP
|
||||
\fB\-h\fP, \fB\-\-help\fP=false
|
||||
help for logs
|
||||
|
||||
.PP
|
||||
\fB\-\-interactive\fP=true
|
||||
If true, prompt the user for input when required. Default true.
|
||||
|
||||
@@ -19,12 +19,6 @@ SUPERSEDED: Set and view the current Kubernetes namespace scope for command lin
|
||||
namespace has been superseded by the context.namespace field of .kubeconfig files. See 'kubectl config set\-context \-\-help' for more details.
|
||||
|
||||
|
||||
.SH OPTIONS
|
||||
.PP
|
||||
\fB\-h\fP, \fB\-\-help\fP=false
|
||||
help for namespace
|
||||
|
||||
|
||||
.SH OPTIONS INHERITED FROM PARENT COMMANDS
|
||||
.PP
|
||||
\fB\-\-alsologtostderr\fP=false
|
||||
|
||||
@@ -28,10 +28,6 @@ Please refer to the models in
|
||||
\fB\-f\fP, \fB\-\-filename\fP=[]
|
||||
Filename, directory, or URL to a file identifying the resource to update
|
||||
|
||||
.PP
|
||||
\fB\-h\fP, \fB\-\-help\fP=false
|
||||
help for patch
|
||||
|
||||
.PP
|
||||
\fB\-o\fP, \fB\-\-output\fP=""
|
||||
Output mode. Use "\-o name" for shorter output (resource/name).
|
||||
|
||||
@@ -17,10 +17,6 @@ Forward one or more local ports to a pod.
|
||||
|
||||
|
||||
.SH OPTIONS
|
||||
.PP
|
||||
\fB\-h\fP, \fB\-\-help\fP=false
|
||||
help for port\-forward
|
||||
|
||||
.PP
|
||||
\fB\-p\fP, \fB\-\-pod\fP=""
|
||||
Pod name
|
||||
|
||||
@@ -54,10 +54,6 @@ The above lets you 'curl localhost:8001/custom/api/v1/pods'
|
||||
\fB\-\-disable\-filter\fP=false
|
||||
If true, disable request filtering in the proxy. This is dangerous, and can leave you vulnerable to XSRF attacks, when used with an accessible port.
|
||||
|
||||
.PP
|
||||
\fB\-h\fP, \fB\-\-help\fP=false
|
||||
help for proxy
|
||||
|
||||
.PP
|
||||
\fB\-p\fP, \fB\-\-port\fP=8001
|
||||
The port on which to run the proxy. Set to 0 to pick a random port.
|
||||
|
||||
@@ -42,10 +42,6 @@ Please refer to the models in
|
||||
\fB\-\-grace\-period\fP=\-1
|
||||
Only relevant during a force replace. Period of time in seconds given to the old resource to terminate gracefully. Ignored if negative.
|
||||
|
||||
.PP
|
||||
\fB\-h\fP, \fB\-\-help\fP=false
|
||||
help for replace
|
||||
|
||||
.PP
|
||||
\fB\-o\fP, \fB\-\-output\fP=""
|
||||
Output mode. Use "\-o name" for shorter output (resource/name).
|
||||
|
||||
@@ -34,10 +34,6 @@ existing replication controller and overwrite at least one (common) label in its
|
||||
\fB\-f\fP, \fB\-\-filename\fP=[]
|
||||
Filename or URL to file to use to create the new replication controller.
|
||||
|
||||
.PP
|
||||
\fB\-h\fP, \fB\-\-help\fP=false
|
||||
help for rolling\-update
|
||||
|
||||
.PP
|
||||
\fB\-\-image\fP=""
|
||||
Image to use for upgrading the replication controller. Can not be used with \-\-filename/\-f
|
||||
@@ -48,7 +44,9 @@ existing replication controller and overwrite at least one (common) label in its
|
||||
|
||||
.PP
|
||||
\fB\-o\fP, \fB\-\-output\fP=""
|
||||
Output format. One of: json|yaml|template|templatefile|wide|jsonpath|name.
|
||||
Output format. One of: json|yaml|wide|name|go\-template=...|go\-template\-file=...|jsonpath=...|jsonpath\-file=... See golang template [
|
||||
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]] and jsonpath template [
|
||||
\[la]http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md\[ra]].
|
||||
|
||||
.PP
|
||||
\fB\-\-output\-version\fP=""
|
||||
@@ -72,9 +70,8 @@ existing replication controller and overwrite at least one (common) label in its
|
||||
|
||||
.PP
|
||||
\fB\-t\fP, \fB\-\-template\fP=""
|
||||
Template string or path to template file to use when \-o=template, \-o=templatefile or \-o=jsonpath. The template format is golang templates [
|
||||
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]. The jsonpath template is composed of jsonpath expressions enclosed by {} [
|
||||
\[la]http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md\[ra]]
|
||||
Template string or path to template file to use when \-o=go\-template, \-o=go\-template\-file. The template format is golang templates [
|
||||
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]].
|
||||
|
||||
.PP
|
||||
\fB\-\-timeout\fP=5m0s
|
||||
|
||||
@@ -31,12 +31,12 @@ Creates a replication controller to manage the created container(s).
|
||||
If true, only print the object that would be sent, without sending it.
|
||||
|
||||
.PP
|
||||
\fB\-\-generator\fP=""
|
||||
The name of the API generator to use. Default is 'run/v1' if \-\-restart=Always, otherwise the default is 'run\-pod/v1'.
|
||||
\fB\-\-env\fP=[]
|
||||
Environment variables to set in the container
|
||||
|
||||
.PP
|
||||
\fB\-h\fP, \fB\-\-help\fP=false
|
||||
help for run
|
||||
\fB\-\-generator\fP=""
|
||||
The name of the API generator to use. Default is 'run/v1' if \-\-restart=Always, otherwise the default is 'run\-pod/v1'.
|
||||
|
||||
.PP
|
||||
\fB\-\-hostport\fP=\-1
|
||||
@@ -56,7 +56,9 @@ Creates a replication controller to manage the created container(s).
|
||||
|
||||
.PP
|
||||
\fB\-o\fP, \fB\-\-output\fP=""
|
||||
Output format. One of: json|yaml|template|templatefile|wide|jsonpath|name.
|
||||
Output format. One of: json|yaml|wide|name|go\-template=...|go\-template\-file=...|jsonpath=...|jsonpath\-file=... See golang template [
|
||||
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]] and jsonpath template [
|
||||
\[la]http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md\[ra]].
|
||||
|
||||
.PP
|
||||
\fB\-\-output\-version\fP=""
|
||||
@@ -92,9 +94,8 @@ Creates a replication controller to manage the created container(s).
|
||||
|
||||
.PP
|
||||
\fB\-t\fP, \fB\-\-template\fP=""
|
||||
Template string or path to template file to use when \-o=template, \-o=templatefile or \-o=jsonpath. The template format is golang templates [
|
||||
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]]. The jsonpath template is composed of jsonpath expressions enclosed by {} [
|
||||
\[la]http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md\[ra]]
|
||||
Template string or path to template file to use when \-o=go\-template, \-o=go\-template\-file. The template format is golang templates [
|
||||
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]].
|
||||
|
||||
.PP
|
||||
\fB\-\-tty\fP=false
|
||||
@@ -203,6 +204,12 @@ Creates a replication controller to manage the created container(s).
|
||||
# Start a single instance of nginx.
|
||||
$ kubectl run nginx \-\-image=nginx
|
||||
|
||||
# Start a single instance of hazelcast and let the container expose port 5701 .
|
||||
$ kubectl run hazelcast \-\-image=hazelcast \-\-port=5701
|
||||
|
||||
# Start a single instance of hazelcast and set environment variables "DNS\_DOMAIN=cluster" and "POD\_NAMESPACE=default" in the container.
|
||||
$ kubectl run hazelcast \-\-image=hazelcast \-\-env="DNS\_DOMAIN=local" \-\-env="POD\_NAMESPACE=default"
|
||||
|
||||
# Start a replicated instance of nginx.
|
||||
$ kubectl run nginx \-\-image=nginx \-\-replicas=5
|
||||
|
||||
|
||||
@@ -31,10 +31,6 @@ scale is sent to the server.
|
||||
\fB\-f\fP, \fB\-\-filename\fP=[]
|
||||
Filename, directory, or URL to a file identifying the replication controller to set a new size
|
||||
|
||||
.PP
|
||||
\fB\-h\fP, \fB\-\-help\fP=false
|
||||
help for scale
|
||||
|
||||
.PP
|
||||
\fB\-o\fP, \fB\-\-output\fP=""
|
||||
Output mode. Use "\-o name" for shorter output (resource/name).
|
||||
|
||||
@@ -37,10 +37,6 @@ If the resource is scalable it will be scaled to 0 before deletion.
|
||||
\fB\-\-grace\-period\fP=\-1
|
||||
Period of time in seconds given to the resource to terminate gracefully. Ignored if negative.
|
||||
|
||||
.PP
|
||||
\fB\-h\fP, \fB\-\-help\fP=false
|
||||
help for stop
|
||||
|
||||
.PP
|
||||
\fB\-\-ignore\-not\-found\fP=false
|
||||
Treat "resource not found" as a successful stop.
|
||||
|
||||
@@ -21,10 +21,6 @@ Print the client and server version information.
|
||||
\fB\-c\fP, \fB\-\-client\fP=false
|
||||
Client version only (no server required).
|
||||
|
||||
.PP
|
||||
\fB\-h\fP, \fB\-\-help\fP=false
|
||||
help for version
|
||||
|
||||
|
||||
.SH OPTIONS INHERITED FROM PARENT COMMANDS
|
||||
.PP
|
||||
|
||||
@@ -49,10 +49,6 @@ Find more information at
|
||||
\fB\-\-context\fP=""
|
||||
The name of the kubeconfig context to use
|
||||
|
||||
.PP
|
||||
\fB\-h\fP, \fB\-\-help\fP=false
|
||||
help for kubectl
|
||||
|
||||
.PP
|
||||
\fB\-\-insecure\-skip\-tls\-verify\fP=false
|
||||
If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
|
||||
|
||||
@@ -47,7 +47,7 @@ done automatically based on statistical analysis and thresholds.
|
||||
* Provide a concrete proposal for implementing auto-scaling pods within Kubernetes
|
||||
* Implementation proposal should be in line with current discussions in existing issues:
|
||||
* Scale verb - [1629](http://issue.k8s.io/1629)
|
||||
* Config conflicts - [Config](https://github.com/GoogleCloudPlatform/kubernetes/blob/c7cb991987193d4ca33544137a5cb7d0292cf7df/docs/config.md#automated-re-configuration-processes)
|
||||
* Config conflicts - [Config](https://github.com/kubernetes/kubernetes/blob/c7cb991987193d4ca33544137a5cb7d0292cf7df/docs/config.md#automated-re-configuration-processes)
|
||||
* Rolling updates - [1353](http://issue.k8s.io/1353)
|
||||
* Multiple scalable types - [1624](http://issue.k8s.io/1624)
|
||||
|
||||
|
||||
@@ -260,7 +260,7 @@ Apart from the above, we want to add support for the following:
|
||||
|
||||
## References
|
||||
|
||||
- https://github.com/GoogleCloudPlatform/kubernetes/issues/1743 has most of the
|
||||
- https://github.com/kubernetes/kubernetes/issues/1743 has most of the
|
||||
discussion that resulted in this proposal.
|
||||
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ HorizontalPodAutoscaler object will be bound with exactly one Scale subresource
|
||||
autoscaling associated replication controller/deployment through it.
|
||||
The main advantage of such approach is that whenever we introduce another type we want to auto-scale,
|
||||
we just need to implement Scale subresource for it (w/o modifying autoscaler code or API).
|
||||
The wider discussion regarding Scale took place in [#1629](https://github.com/GoogleCloudPlatform/kubernetes/issues/1629).
|
||||
The wider discussion regarding Scale took place in [#1629](https://github.com/kubernetes/kubernetes/issues/1629).
|
||||
|
||||
Scale subresource will be present in API for replication controller or deployment under the following paths:
|
||||
|
||||
@@ -192,7 +192,7 @@ The autoscaler will be implemented as a control loop.
|
||||
It will periodically (e.g.: every 1 minute) query pods described by ```Status.PodSelector``` of Scale subresource,
|
||||
and check their average CPU or memory usage from the last 1 minute
|
||||
(there will be API on master for this purpose, see
|
||||
[#11951](https://github.com/GoogleCloudPlatform/kubernetes/issues/11951).
|
||||
[#11951](https://github.com/kubernetes/kubernetes/issues/11951).
|
||||
Then, it will compare the current CPU or memory consumption with the Target,
|
||||
and adjust the count of the Scale if needed to match the target
|
||||
(preserving condition: MinCount <= Count <= MaxCount).
|
||||
@@ -200,16 +200,20 @@ and adjust the count of the Scale if needed to match the target
|
||||
The target number of pods will be calculated from the following formula:
|
||||
|
||||
```
|
||||
TargetNumOfPods = sum(CurrentPodsConsumption) / Target
|
||||
TargetNumOfPods =ceil(sum(CurrentPodsConsumption) / Target)
|
||||
```
|
||||
|
||||
To make scaling more stable, scale-up will happen only when the floor of ```TargetNumOfPods``` is higher than
|
||||
the current number, while scale-down will happen only when the ceiling of ```TargetNumOfPods``` is lower than
|
||||
the current number.
|
||||
Starting and stopping pods may introduce noise to the metrics (for instance starting may temporarily increase
|
||||
CPU and decrease average memory consumption) so, after each action, the autoscaler should wait some time for reliable data.
|
||||
|
||||
The decision to scale-up will be executed instantly.
|
||||
However, we will execute scale-down only if the sufficient time has passed from the last scale-up (e.g.: 10 minutes).
|
||||
Such approach has two benefits:
|
||||
Scale-up will happen if there was no rescaling within the last 3 minutes.
|
||||
Scale-down will wait for 10 minutes from the last rescaling. Moreover any scaling will only be made if
|
||||
|
||||
```
|
||||
avg(CurrentPodsConsumption) / Target
|
||||
```
|
||||
|
||||
drops below 0.9 or increases above 1.1 (10% tolerance). Such approach has two benefits:
|
||||
|
||||
* Autoscaler works in a conservative way.
|
||||
If new user load appears, it is important for us to rapidly increase the number of pods,
|
||||
@@ -218,10 +222,6 @@ Such approach has two benefits:
|
||||
|
||||
* Autoscaler avoids thrashing, i.e.: prevents rapid execution of conflicting decision if the load is not stable.
|
||||
|
||||
|
||||
As the CPU consumption of a pod immediately after start may be highly variable due to initialization/startup,
|
||||
autoscaler will skip metrics from the first minute of pod lifecycle.
|
||||
|
||||
## Relative vs. absolute metrics
|
||||
|
||||
The question arises whether the values of the target metrics should be absolute (e.g.: 0.6 core, 100MB of RAM)
|
||||
@@ -265,9 +265,9 @@ Our design is in general compatible with them.
|
||||
and then turned-on when there is a demand for them.
|
||||
When a request to service with no pods arrives, kube-proxy will generate an event for autoscaler
|
||||
to create a new pod.
|
||||
Discussed in [#3247](https://github.com/GoogleCloudPlatform/kubernetes/issues/3247).
|
||||
Discussed in [#3247](https://github.com/kubernetes/kubernetes/issues/3247).
|
||||
* When scaling down, make more educated decision which pods to kill (e.g.: if two or more pods are on the same node, kill one of them).
|
||||
Discussed in [#4301](https://github.com/GoogleCloudPlatform/kubernetes/issues/4301).
|
||||
Discussed in [#4301](https://github.com/kubernetes/kubernetes/issues/4301).
|
||||
* Allow rule based autoscaling: instead of specifying the target value for metric,
|
||||
specify a rule, e.g.: “if average CPU consumption of pod is higher than 80% add two more replicas”.
|
||||
This approach was initially suggested in
|
||||
|
||||
@@ -40,8 +40,8 @@ for managing pod(s) that require running once to completion even if the machine
|
||||
the pod is running on fails, in contrast to what ReplicationController currently offers.
|
||||
|
||||
Several existing issues and PRs were already created regarding that particular subject:
|
||||
* Job Controller [#1624](https://github.com/GoogleCloudPlatform/kubernetes/issues/1624)
|
||||
* New Job resource [#7380](https://github.com/GoogleCloudPlatform/kubernetes/pull/7380)
|
||||
* Job Controller [#1624](https://github.com/kubernetes/kubernetes/issues/1624)
|
||||
* New Job resource [#7380](https://github.com/kubernetes/kubernetes/pull/7380)
|
||||
|
||||
|
||||
## Use Cases
|
||||
@@ -181,7 +181,7 @@ Below are the possible future extensions to the Job controller:
|
||||
* Be able to limit the execution time for a job, similarly to ActiveDeadlineSeconds for Pods.
|
||||
* Be able to create a chain of jobs dependent one on another.
|
||||
* Be able to specify the work each of the workers should execute (see type 1 from
|
||||
[this comment](https://github.com/GoogleCloudPlatform/kubernetes/issues/1624#issuecomment-97622142))
|
||||
[this comment](https://github.com/kubernetes/kubernetes/issues/1624#issuecomment-97622142))
|
||||
* Be able to inspect Pods running a Job, especially after a Job has finished, e.g.
|
||||
by providing pointers to Pods in the JobStatus ([see comment](https://github.com/kubernetes/kubernetes/pull/11746/files#r37142628)).
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ Documentation for other releases can be found at
|
||||
|
||||
We're in the process of prioritizing changes to be made after 1.0.
|
||||
|
||||
Please watch the [Github milestones] (https://github.com/GoogleCloudPlatform/kubernetes/milestones) for our future plans.
|
||||
Please watch the [Github milestones] (https://github.com/kubernetes/kubernetes/milestones) for our future plans.
|
||||
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
|
||||
@@ -62,9 +62,9 @@ You may also find the Stack Overflow topics relevant:
|
||||
|
||||
Someone else from the community may have already asked a similar question or may be able to help with your problem. The Kubernetes team will also monitor [posts tagged kubernetes](http://stackoverflow.com/questions/tagged/kubernetes). If there aren't any existing questions that help, please [ask a new one](http://stackoverflow.com/questions/ask?tags=kubernetes)!
|
||||
|
||||
## IRC
|
||||
## <a name="slack"></a>Slack
|
||||
|
||||
The Kubernetes team hangs out on IRC at [`#google-containers`](https://botbot.me/freenode/google-containers/) on freenode. Feel free to come and ask any and all questions there.
|
||||
The Kubernetes team hangs out on Slack in the `#kubernetes-users` channel. You can participate in the Kubernetes team [here](https://kubernetes.slack.com). Slack requires registration, but the Kubernetes team is open invitation to anyone to register [here](http://slack.kubernetes.io). Feel free to come and ask any and all questions.
|
||||
|
||||
## Mailing List
|
||||
|
||||
@@ -76,7 +76,10 @@ If you have what looks like a bug, or you would like to make a feature request,
|
||||
|
||||
Before you file an issue, please search existing issues to see if your issue is already covered.
|
||||
|
||||
If filing a bug, please include detailed information about how to reproduce the problem.
|
||||
If filing a bug, please include detailed information about how to reproduce the problem, such as:
|
||||
* Kubernetes version: `kubectl version`
|
||||
* Cloud provider, OS distro, network configuration, and Docker version
|
||||
* Steps to reproduce the problem
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
|
||||
@@ -58,7 +58,7 @@ This is *not* a guide for people who want to debug their cluster. For that you
|
||||
|
||||
## FAQ
|
||||
|
||||
Users are highly encouraged to check out our [FAQ](https://github.com/GoogleCloudPlatform/kubernetes/wiki/User-FAQ)
|
||||
Users are highly encouraged to check out our [FAQ](https://github.com/kubernetes/kubernetes/wiki/User-FAQ)
|
||||
|
||||
## Diagnosing the problem
|
||||
|
||||
@@ -152,7 +152,7 @@ If you misspelled `command` as `commnd` then will give an error like this:
|
||||
|
||||
```
|
||||
I0805 10:43:25.129850 46757 schema.go:126] unknown field: commnd
|
||||
I0805 10:43:25.129973 46757 schema.go:129] this may be a false alarm, see https://github.com/GoogleCloudPlatform/kubernetes/issues/6842
|
||||
I0805 10:43:25.129973 46757 schema.go:129] this may be a false alarm, see https://github.com/kubernetes/kubernetes/issues/6842
|
||||
pods/mypod
|
||||
```
|
||||
|
||||
|
||||
@@ -250,12 +250,12 @@ Events:
|
||||
|
||||
The `Restart Count: 5` indicates that the `simmemleak` container in this pod was terminated and restarted 5 times.
|
||||
|
||||
You can call `get pod` with the `-o template -t ...` option to fetch the status of previously terminated containers:
|
||||
You can call `get pod` with the `-o go-template=...` option to fetch the status of previously terminated containers:
|
||||
|
||||
```console
|
||||
[13:59:01] $ ./cluster/kubectl.sh get pod -o template -t '{{range.status.containerStatuses}}{{"Container Name: "}}{{.name}}{{"\r\nLastState: "}}{{.lastState}}{{end}}' simmemleak-60xbc
|
||||
[13:59:01] $ ./cluster/kubectl.sh get pod -o go-template='{{range.status.containerStatuses}}{{"Container Name: "}}{{.name}}{{"\r\nLastState: "}}{{.lastState}}{{end}}' simmemleak-60xbc
|
||||
Container Name: simmemleak
|
||||
LastState: map[terminated:map[exitCode:137 reason:OOM Killed startedAt:2015-07-07T20:58:43Z finishedAt:2015-07-07T20:58:43Z containerID:docker://0e4095bba1feccdfe7ef9fb6ebffe972b4b14285d5acdec6f0d3ae8a22fad8b2]][13:59:03] clusterScaleDoc ~/go/src/github.com/GoogleCloudPlatform/kubernetes $
|
||||
LastState: map[terminated:map[exitCode:137 reason:OOM Killed startedAt:2015-07-07T20:58:43Z finishedAt:2015-07-07T20:58:43Z containerID:docker://0e4095bba1feccdfe7ef9fb6ebffe972b4b14285d5acdec6f0d3ae8a22fad8b2]][13:59:03] clusterScaleDoc ~/go/src/github.com/kubernetes/kubernetes $
|
||||
```
|
||||
|
||||
We can see that this container was terminated because `reason:OOM Killed`, where *OOM* stands for Out Of Memory.
|
||||
|
||||
@@ -109,12 +109,12 @@ pods/hello-world
|
||||
|
||||
`kubectl create --validate` currently warns about problems it detects, but creates the resource anyway, unless a required field is absent or a field value is invalid. Unknown API fields are ignored, so be careful. This pod was created, but with no `command`, which is an optional field, since the image may specify an `Entrypoint`.
|
||||
View the [Pod API
|
||||
object](https://htmlpreview.github.io/?https://github.com/GoogleCloudPlatform/kubernetes/HEAD/docs/api-reference/definitions.html#_v1_pod)
|
||||
object](https://htmlpreview.github.io/?https://github.com/kubernetes/kubernetes/HEAD/docs/api-reference/definitions.html#_v1_pod)
|
||||
to see the list of valid fields.
|
||||
|
||||
## Environment variables and variable expansion
|
||||
|
||||
Kubernetes [does not automatically run commands in a shell](https://github.com/GoogleCloudPlatform/kubernetes/wiki/User-FAQ#use-of-environment-variables-on-the-command-line) (not all images contain shells). If you would like to run your command in a shell, such as to expand environment variables (specified using `env`), you could do the following:
|
||||
Kubernetes [does not automatically run commands in a shell](https://github.com/kubernetes/kubernetes/wiki/User-FAQ#use-of-environment-variables-on-the-command-line) (not all images contain shells). If you would like to run your command in a shell, such as to expand environment variables (specified using `env`), you could do the following:
|
||||
|
||||
```yaml
|
||||
apiVersion: v1
|
||||
|
||||
@@ -128,7 +128,7 @@ spec:
|
||||
app: nginx
|
||||
```
|
||||
|
||||
This specification will create a Service which targets TCP port 80 on any Pod with the `app=nginx` label, and expose it on an abstracted Service port (`targetPort`: is the port the container accepts traffic on, `port`: is the abstracted Service port, which can be any port other pods use to access the Service). View [service API object](https://htmlpreview.github.io/?https://github.com/GoogleCloudPlatform/kubernetes/HEAD/docs/api-reference/definitions.html#_v1_service) to see the list of supported fields in service definition.
|
||||
This specification will create a Service which targets TCP port 80 on any Pod with the `app=nginx` label, and expose it on an abstracted Service port (`targetPort`: is the port the container accepts traffic on, `port`: is the abstracted Service port, which can be any port other pods use to access the Service). View [service API object](https://htmlpreview.github.io/?https://github.com/kubernetes/kubernetes/HEAD/docs/api-reference/definitions.html#_v1_service) to see the list of supported fields in service definition.
|
||||
Check your Service:
|
||||
|
||||
```console
|
||||
|
||||
@@ -546,9 +546,9 @@ misbehaving. And yet your `Service` is not working. You should probably let
|
||||
us know, so we can help investigate!
|
||||
|
||||
Contact us on
|
||||
[IRC](http://webchat.freenode.net/?channels=google-containers) or
|
||||
[Slack](../troubleshooting.md#slack) or
|
||||
[email](https://groups.google.com/forum/#!forum/google-containers) or
|
||||
[GitHub](https://github.com/GoogleCloudPlatform/kubernetes).
|
||||
[GitHub](https://github.com/kubernetes/kubernetes).
|
||||
|
||||
## More information
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ spec:
|
||||
|
||||
Some differences compared to specifying just a pod are that the `kind` is `ReplicationController`, the number of `replicas` desired is specified, and the pod specification is under the `template` field. The names of the pods don’t need to be specified explicitly because they are generated from the name of the replication controller.
|
||||
View the [replication controller API
|
||||
object](https://htmlpreview.github.io/?https://github.com/GoogleCloudPlatform/kubernetes/HEAD/docs/api-reference/definitions.html#_v1_replicationcontroller)
|
||||
object](https://htmlpreview.github.io/?https://github.com/kubernetes/kubernetes/HEAD/docs/api-reference/definitions.html#_v1_replicationcontroller)
|
||||
to view the list of supported fields.
|
||||
|
||||
This replication controller can be created using `create`, just as with pods:
|
||||
|
||||
@@ -58,7 +58,7 @@ How do I run an nginx container and expose it to the world? Checkout [kubectl ru
|
||||
With docker:
|
||||
|
||||
```console
|
||||
$ docker run -d --restart=always --name nginx-app -p 80:80 nginx
|
||||
$ docker run -d --restart=always -e DOMAIN=cluster --name nginx-app -p 80:80 nginx
|
||||
a9ec34d9878748d2f33dc20cb25c714ff21da8d40558b45bfaec9955859075d0
|
||||
$ docker ps
|
||||
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
||||
@@ -69,7 +69,7 @@ With kubectl:
|
||||
|
||||
```console
|
||||
# start the pod running nginx
|
||||
$ kubectl run --image=nginx nginx-app
|
||||
$ kubectl run --image=nginx nginx-app --port=80 --env="DOMAIN=local"
|
||||
CONTROLLER CONTAINER(S) IMAGE(S) SELECTOR REPLICAS
|
||||
nginx-app nginx-app nginx run=nginx-app 1
|
||||
# expose a port through with a service
|
||||
|
||||
@@ -30,7 +30,9 @@ Documentation for other releases can be found at
|
||||
<!-- END STRIP_FOR_RELEASE -->
|
||||
|
||||
<!-- END MUNGE: UNVERSIONED_WARNING -->
|
||||
#Getting into containers: kubectl exec
|
||||
|
||||
# Getting into containers: kubectl exec
|
||||
|
||||
Developers can use `kubectl exec` to run commands in a container. This guide demonstrates two use cases.
|
||||
|
||||
## Using kubectl exec to check the environment variables of a container
|
||||
|
||||
@@ -137,20 +137,25 @@ $ kubectl config view
|
||||
produces this output
|
||||
|
||||
```yaml
|
||||
apiVersion: v1
|
||||
clusters:
|
||||
local-server:
|
||||
- cluster:
|
||||
server: http://localhost:8080
|
||||
name: local-server
|
||||
contexts:
|
||||
default-context:
|
||||
- context:
|
||||
cluster: local-server
|
||||
namespace: the-right-prefix
|
||||
user: myself
|
||||
name: default-context
|
||||
current-context: default-context
|
||||
kind: Config
|
||||
preferences: {}
|
||||
users:
|
||||
myself:
|
||||
username: admin
|
||||
- name: myself
|
||||
user:
|
||||
password: secret
|
||||
username: admin
|
||||
```
|
||||
|
||||
and a kubeconfig file that looks like this
|
||||
@@ -173,8 +178,8 @@ preferences: {}
|
||||
users:
|
||||
- name: myself
|
||||
user:
|
||||
username: admin
|
||||
password: secret
|
||||
username: admin
|
||||
```
|
||||
|
||||
#### Commands for the example file
|
||||
|
||||
@@ -56,7 +56,6 @@ kubectl
|
||||
--client-key="": Path to a client key file for TLS.
|
||||
--cluster="": The name of the kubeconfig cluster to use
|
||||
--context="": The name of the kubeconfig context to use
|
||||
-h, --help[=false]: help for kubectl
|
||||
--insecure-skip-tls-verify[=false]: If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
|
||||
--kubeconfig="": Path to the kubeconfig file to use for CLI requests.
|
||||
--log-backtrace-at=:0: when logging hits line file:N, emit a stack trace
|
||||
@@ -101,7 +100,7 @@ kubectl
|
||||
* [kubectl stop](kubectl_stop.md) - Deprecated: Gracefully shut down a resource by name or filename.
|
||||
* [kubectl version](kubectl_version.md) - Print the client and server version information.
|
||||
|
||||
###### Auto generated by spf13/cobra at 2015-08-21 17:18:05.169032754 +0000 UTC
|
||||
###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.476725335 +0000 UTC
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
|
||||
@@ -83,7 +83,6 @@ $ kubectl annotate pods foo description-
|
||||
```
|
||||
--all[=false]: select all resources in the namespace of the specified resource types
|
||||
-f, --filename=[]: Filename, directory, or URL to a file identifying the resource to update the annotation
|
||||
-h, --help[=false]: help for annotate
|
||||
--overwrite[=false]: If true, allow annotations to be overwritten, otherwise reject annotation updates that overwrite existing annotations.
|
||||
--resource-version="": If non-empty, the annotation update will only succeed if this is the current resource-version for the object. Only valid when specifying a single resource.
|
||||
```
|
||||
@@ -120,7 +119,7 @@ $ kubectl annotate pods foo description-
|
||||
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra at 2015-08-27 02:40:25.687121316 +0000 UTC
|
||||
###### Auto generated by spf13/cobra at 2015-09-02 06:24:17.720533039 +0000 UTC
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
|
||||
@@ -44,12 +44,6 @@ Print available API versions.
|
||||
kubectl api-versions
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help[=false]: help for api-versions
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
@@ -82,7 +76,7 @@ kubectl api-versions
|
||||
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra at 2015-08-21 17:18:05.168773226 +0000 UTC
|
||||
###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.476265479 +0000 UTC
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
|
||||
@@ -62,7 +62,6 @@ $ kubectl attach 123456-7890 -c ruby-container -i -t
|
||||
|
||||
```
|
||||
-c, --container="": Container name
|
||||
-h, --help[=false]: help for attach
|
||||
-i, --stdin[=false]: Pass stdin to the container
|
||||
-t, --tty[=false]: Stdin is a TTY
|
||||
```
|
||||
@@ -99,7 +98,7 @@ $ kubectl attach 123456-7890 -c ruby-container -i -t
|
||||
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra at 2015-09-02 09:55:50.948089316 +0000 UTC
|
||||
###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.471309711 +0000 UTC
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
|
||||
@@ -44,12 +44,6 @@ Display addresses of the master and services with label kubernetes.io/cluster-se
|
||||
kubectl cluster-info
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help[=false]: help for cluster-info
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
@@ -82,7 +76,7 @@ kubectl cluster-info
|
||||
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra at 2015-08-21 17:18:05.168659453 +0000 UTC
|
||||
###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.476078738 +0000 UTC
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
|
||||
@@ -53,7 +53,6 @@ kubectl config SUBCOMMAND
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help[=false]: help for config
|
||||
--kubeconfig="": use a particular kubeconfig file
|
||||
```
|
||||
|
||||
@@ -95,7 +94,7 @@ kubectl config SUBCOMMAND
|
||||
* [kubectl config use-context](kubectl_config_use-context.md) - Sets the current-context in a kubeconfig file
|
||||
* [kubectl config view](kubectl_config_view.md) - displays Merged kubeconfig settings or a specified kubeconfig file.
|
||||
|
||||
###### Auto generated by spf13/cobra at 2015-08-21 17:18:05.16853102 +0000 UTC
|
||||
###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.475888484 +0000 UTC
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
|
||||
@@ -64,7 +64,6 @@ $ kubectl config set-cluster e2e --insecure-skip-tls-verify=true
|
||||
--api-version="": api-version for the cluster entry in kubeconfig
|
||||
--certificate-authority="": path to certificate-authority for the cluster entry in kubeconfig
|
||||
--embed-certs=false: embed-certs for the cluster entry in kubeconfig
|
||||
-h, --help[=false]: help for set-cluster
|
||||
--insecure-skip-tls-verify=false: insecure-skip-tls-verify for the cluster entry in kubeconfig
|
||||
--server="": server for the cluster entry in kubeconfig
|
||||
```
|
||||
@@ -97,7 +96,7 @@ $ kubectl config set-cluster e2e --insecure-skip-tls-verify=true
|
||||
|
||||
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files
|
||||
|
||||
###### Auto generated by spf13/cobra at 2015-08-21 17:18:05.167359915 +0000 UTC
|
||||
###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.474677631 +0000 UTC
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
|
||||
@@ -56,7 +56,6 @@ $ kubectl config set-context gce --user=cluster-admin
|
||||
|
||||
```
|
||||
--cluster="": cluster for the context entry in kubeconfig
|
||||
-h, --help[=false]: help for set-context
|
||||
--namespace="": namespace for the context entry in kubeconfig
|
||||
--user="": user for the context entry in kubeconfig
|
||||
```
|
||||
@@ -90,7 +89,7 @@ $ kubectl config set-context gce --user=cluster-admin
|
||||
|
||||
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files
|
||||
|
||||
###### Auto generated by spf13/cobra at 2015-08-21 17:18:05.168034038 +0000 UTC
|
||||
###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.475093212 +0000 UTC
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
|
||||
@@ -77,7 +77,6 @@ $ kubectl config set-credentials cluster-admin --client-certificate=~/.kube/admi
|
||||
--client-certificate="": path to client-certificate for the user entry in kubeconfig
|
||||
--client-key="": path to client-key for the user entry in kubeconfig
|
||||
--embed-certs=false: embed client cert/key for the user entry in kubeconfig
|
||||
-h, --help[=false]: help for set-credentials
|
||||
--password="": password for the user entry in kubeconfig
|
||||
--token="": token for the user entry in kubeconfig
|
||||
--username="": username for the user entry in kubeconfig
|
||||
@@ -110,7 +109,7 @@ $ kubectl config set-credentials cluster-admin --client-certificate=~/.kube/admi
|
||||
|
||||
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files
|
||||
|
||||
###### Auto generated by spf13/cobra at 2015-08-21 17:18:05.167500874 +0000 UTC
|
||||
###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.474882527 +0000 UTC
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
|
||||
@@ -46,12 +46,6 @@ PROPERTY_VALUE is the new value you wish to set.
|
||||
kubectl config set PROPERTY_NAME PROPERTY_VALUE
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help[=false]: help for set
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
@@ -84,7 +78,7 @@ kubectl config set PROPERTY_NAME PROPERTY_VALUE
|
||||
|
||||
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files
|
||||
|
||||
###### Auto generated by spf13/cobra at 2015-08-21 17:18:05.16816699 +0000 UTC
|
||||
###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.475281504 +0000 UTC
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
|
||||
@@ -45,12 +45,6 @@ PROPERTY_NAME is a dot delimited name where each token represents either a attri
|
||||
kubectl config unset PROPERTY_NAME
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help[=false]: help for unset
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
@@ -83,7 +77,7 @@ kubectl config unset PROPERTY_NAME
|
||||
|
||||
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files
|
||||
|
||||
###### Auto generated by spf13/cobra at 2015-08-21 17:18:05.168279315 +0000 UTC
|
||||
###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.475473658 +0000 UTC
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
|
||||
@@ -44,12 +44,6 @@ Sets the current-context in a kubeconfig file
|
||||
kubectl config use-context CONTEXT_NAME
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
```
|
||||
-h, --help[=false]: help for use-context
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
||||
```
|
||||
@@ -82,7 +76,7 @@ kubectl config use-context CONTEXT_NAME
|
||||
|
||||
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files
|
||||
|
||||
###### Auto generated by spf13/cobra at 2015-08-21 17:18:05.168411074 +0000 UTC
|
||||
###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.475674294 +0000 UTC
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
|
||||
@@ -60,16 +60,15 @@ $ kubectl config view -o template --template='{{range .users}}{{ if eq .name "e2
|
||||
|
||||
```
|
||||
--flatten[=false]: flatten the resulting kubeconfig file into self contained output (useful for creating portable kubeconfig files)
|
||||
-h, --help[=false]: help for view
|
||||
--merge=true: merge together the full hierarchy of kubeconfig files
|
||||
--minify[=false]: remove all information not used by current-context from the output
|
||||
--no-headers[=false]: When using the default output, don't print headers.
|
||||
-o, --output="": Output format. One of: json|yaml|template|templatefile|wide|jsonpath|name.
|
||||
-o, --output="": Output format. One of: json|yaml|wide|name|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=... See golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath template [http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md].
|
||||
--output-version="": Output the formatted object with the given version (default api-version).
|
||||
--raw[=false]: display raw byte data
|
||||
-a, --show-all[=false]: When printing, show all resources (default hide terminated pods.)
|
||||
--sort-by="": If non-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. 'ObjectMeta.Name'). The field in the API resource specified by this JSONPath expression must be an integer or a string.
|
||||
--template="": Template string or path to template file to use when -o=template, -o=templatefile or -o=jsonpath. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. The jsonpath template is composed of jsonpath expressions enclosed by {} [http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md]
|
||||
--template="": Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
@@ -104,7 +103,7 @@ $ kubectl config view -o template --template='{{range .users}}{{ if eq .name "e2
|
||||
|
||||
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files
|
||||
|
||||
###### Auto generated by spf13/cobra at 2015-08-26 09:03:39.977436672 +0000 UTC
|
||||
###### Auto generated by spf13/cobra at 2015-08-29 13:01:26.775349034 +0000 UTC
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
|
||||
@@ -60,7 +60,6 @@ $ cat pod.json | kubectl create -f -
|
||||
|
||||
```
|
||||
-f, --filename=[]: Filename, directory, or URL to file to use to create the resource
|
||||
-h, --help[=false]: help for create
|
||||
-o, --output="": Output mode. Use "-o name" for shorter output (resource/name).
|
||||
--validate[=true]: If true, use a schema to validate the input before sending it
|
||||
```
|
||||
@@ -97,7 +96,7 @@ $ cat pod.json | kubectl create -f -
|
||||
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra at 2015-08-27 08:49:26.55743532 +0000 UTC
|
||||
###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.469492371 +0000 UTC
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
|
||||
@@ -81,7 +81,6 @@ $ kubectl delete pods --all
|
||||
--cascade[=true]: If true, cascade the deletion of the resources managed by this resource (e.g. Pods created by a ReplicationController). Default true.
|
||||
-f, --filename=[]: Filename, directory, or URL to a file containing the resource to delete.
|
||||
--grace-period=-1: Period of time in seconds given to the resource to terminate gracefully. Ignored if negative.
|
||||
-h, --help[=false]: help for delete
|
||||
--ignore-not-found[=false]: Treat "resource not found" as a successful delete. Defaults to "true" when --all is specified.
|
||||
-o, --output="": Output mode. Use "-o name" for shorter output (resource/name).
|
||||
-l, --selector="": Selector (label query) to filter on.
|
||||
@@ -120,7 +119,7 @@ $ kubectl delete pods --all
|
||||
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra at 2015-08-25 10:17:24.591839542 +0000 UTC
|
||||
###### Auto generated by spf13/cobra at 2015-09-03 21:06:22.470182255 +0000 UTC
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user