Skip to content

Commit 6edcbeb

Browse files
authored
Merge pull request #43575 from windsonsea/secyhf
Tweak issues-security/security and kubectl index
2 parents 6367ab2 + 97175e4 commit 6edcbeb

File tree

2 files changed

+71
-35
lines changed

2 files changed

+71
-35
lines changed

content/en/docs/reference/issues-security/security.md

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,27 @@ weight: 20
1313
<!-- overview -->
1414
This page describes Kubernetes security and disclosure information.
1515

16-
1716
<!-- body -->
1817
## Security Announcements
1918

20-
Join the [kubernetes-security-announce](https://groups.google.com/forum/#!forum/kubernetes-security-announce) group for emails about security and major API announcements.
19+
Join the [kubernetes-security-announce](https://groups.google.com/forum/#!forum/kubernetes-security-announce)
20+
group for emails about security and major API announcements.
2121

2222
## Report a Vulnerability
2323

24-
We're extremely grateful for security researchers and users that report vulnerabilities to the Kubernetes Open Source Community. All reports are thoroughly investigated by a set of community volunteers.
24+
We're extremely grateful for security researchers and users that report vulnerabilities to
25+
the Kubernetes Open Source Community. All reports are thoroughly investigated by a set of community volunteers.
2526

26-
To make a report, submit your vulnerability to the [Kubernetes bug bounty program](https://hackerone.com/kubernetes). This allows triage and handling of the vulnerability with standardized response times.
27+
To make a report, submit your vulnerability to the [Kubernetes bug bounty program](https://hackerone.com/kubernetes).
28+
This allows triage and handling of the vulnerability with standardized response times.
2729

28-
You can also email the private [[email protected]](mailto:[email protected]) list with the security details and the details expected for [all Kubernetes bug reports](https://github.com/kubernetes/kubernetes/blob/master/.github/ISSUE_TEMPLATE/bug-report.yaml).
30+
You can also email the private [[email protected]](mailto:[email protected])
31+
list with the security details and the details expected for
32+
[all Kubernetes bug reports](https://github.com/kubernetes/kubernetes/blob/master/.github/ISSUE_TEMPLATE/bug-report.yaml).
2933

30-
You may encrypt your email to this list using the GPG keys of the [Security Response Committee members](https://git.k8s.io/security/README.md#product-security-committee-psc). Encryption using GPG is NOT required to make a disclosure.
34+
You may encrypt your email to this list using the GPG keys of the
35+
[Security Response Committee members](https://git.k8s.io/security/README.md#product-security-committee-psc).
36+
Encryption using GPG is NOT required to make a disclosure.
3137

3238
### When Should I Report a Vulnerability?
3339

@@ -36,7 +42,6 @@ You may encrypt your email to this list using the GPG keys of the [Security Resp
3642
- You think you discovered a vulnerability in another project that Kubernetes depends on
3743
- For projects with their own vulnerability reporting and disclosure process, please report it directly there
3844

39-
4045
### When Should I NOT Report a Vulnerability?
4146

4247
- You need help tuning Kubernetes components for security
@@ -45,13 +50,19 @@ You may encrypt your email to this list using the GPG keys of the [Security Resp
4550

4651
## Security Vulnerability Response
4752

48-
Each report is acknowledged and analyzed by Security Response Committee members within 3 working days. This will set off the [Security Release Process](https://git.k8s.io/security/security-release-process.md#disclosures).
53+
Each report is acknowledged and analyzed by Security Response Committee members within 3 working days.
54+
This will set off the [Security Release Process](https://git.k8s.io/security/security-release-process.md#disclosures).
4955

50-
Any vulnerability information shared with Security Response Committee stays within Kubernetes project and will not be disseminated to other projects unless it is necessary to get the issue fixed.
56+
Any vulnerability information shared with Security Response Committee stays within Kubernetes project
57+
and will not be disseminated to other projects unless it is necessary to get the issue fixed.
5158

5259
As the security issue moves from triage, to identified fix, to release planning we will keep the reporter updated.
5360

5461
## Public Disclosure Timing
5562

56-
A public disclosure date is negotiated by the Kubernetes Security Response Committee and the bug submitter. We prefer to fully disclose the bug as soon as possible once a user mitigation is available. It is reasonable to delay disclosure when the bug or the fix is not yet fully understood, the solution is not well-tested, or for vendor coordination. The timeframe for disclosure is from immediate (especially if it's already publicly known) to a few weeks. For a vulnerability with a straightforward mitigation, we expect report date to disclosure date to be on the order of 7 days. The Kubernetes Security Response Committee holds the final say when setting a disclosure date.
57-
63+
A public disclosure date is negotiated by the Kubernetes Security Response Committee and the bug submitter.
64+
We prefer to fully disclose the bug as soon as possible once a user mitigation is available. It is reasonable
65+
to delay disclosure when the bug or the fix is not yet fully understood, the solution is not well-tested,
66+
or for vendor coordination. The timeframe for disclosure is from immediate (especially if it's already publicly known)
67+
to a few weeks. For a vulnerability with a straightforward mitigation, we expect report date to disclosure date
68+
to be on the order of 7 days. The Kubernetes Security Response Committee holds the final say when setting a disclosure date.

content/en/docs/reference/kubectl/_index.md

Lines changed: 49 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ For details about each command, including all the supported flags and subcommand
2525

2626
For installation instructions, see [Installing kubectl](/docs/tasks/tools/#kubectl);
2727
for a quick guide, see the [cheat sheet](/docs/reference/kubectl/cheatsheet/).
28-
If you're used to using the `docker` command-line tool, [`kubectl` for Docker Users](/docs/reference/kubectl/docker-cli-to-kubectl/) explains some equivalent commands for Kubernetes.
28+
If you're used to using the `docker` command-line tool,
29+
[`kubectl` for Docker Users](/docs/reference/kubectl/docker-cli-to-kubectl/) explains some equivalent commands for Kubernetes.
2930

3031
<!-- body -->
3132

@@ -39,37 +40,41 @@ kubectl [command] [TYPE] [NAME] [flags]
3940

4041
where `command`, `TYPE`, `NAME`, and `flags` are:
4142

42-
* `command`: Specifies the operation that you want to perform on one or more resources,
43-
for example `create`, `get`, `describe`, `delete`.
43+
* `command`: Specifies the operation that you want to perform on one or more resources,
44+
for example `create`, `get`, `describe`, `delete`.
4445

4546
* `TYPE`: Specifies the [resource type](#resource-types). Resource types are case-insensitive and
4647
you can specify the singular, plural, or abbreviated forms.
4748
For example, the following commands produce the same output:
4849

49-
```shell
50-
kubectl get pod pod1
51-
kubectl get pods pod1
52-
kubectl get po pod1
53-
```
50+
```shell
51+
kubectl get pod pod1
52+
kubectl get pods pod1
53+
kubectl get po pod1
54+
```
5455

55-
* `NAME`: Specifies the name of the resource. Names are case-sensitive. If the name is omitted, details for all resources are displayed, for example `kubectl get pods`.
56+
* `NAME`: Specifies the name of the resource. Names are case-sensitive. If the name is omitted,
57+
details for all resources are displayed, for example `kubectl get pods`.
5658

57-
When performing an operation on multiple resources, you can specify each resource by type and name or specify one or more files:
59+
When performing an operation on multiple resources, you can specify each resource by
60+
type and name or specify one or more files:
5861

59-
* To specify resources by type and name:
62+
* To specify resources by type and name:
6063

61-
* To group resources if they are all the same type: `TYPE1 name1 name2 name<#>`.<br/>
64+
* To group resources if they are all the same type: `TYPE1 name1 name2 name<#>`.<br/>
6265
Example: `kubectl get pod example-pod1 example-pod2`
6366

64-
* To specify multiple resource types individually: `TYPE1/name1 TYPE1/name2 TYPE2/name3 TYPE<#>/name<#>`.<br/>
67+
* To specify multiple resource types individually: `TYPE1/name1 TYPE1/name2 TYPE2/name3 TYPE<#>/name<#>`.<br/>
6568
Example: `kubectl get pod/example-pod1 replicationcontroller/example-rc1`
6669

67-
* To specify resources with one or more files: `-f file1 -f file2 -f file<#>`
70+
* To specify resources with one or more files: `-f file1 -f file2 -f file<#>`
6871

69-
* [Use YAML rather than JSON](/docs/concepts/configuration/overview/#general-configuration-tips) since YAML tends to be more user-friendly, especially for configuration files.<br/>
70-
Example: `kubectl get -f ./pod.yaml`
72+
* [Use YAML rather than JSON](/docs/concepts/configuration/overview/#general-configuration-tips)
73+
since YAML tends to be more user-friendly, especially for configuration files.<br/>
74+
Example: `kubectl get -f ./pod.yaml`
7175

72-
* `flags`: Specifies optional flags. For example, you can use the `-s` or `--server` flags to specify the address and port of the Kubernetes API server.<br/>
76+
* `flags`: Specifies optional flags. For example, you can use the `-s` or `--server` flags
77+
to specify the address and port of the Kubernetes API server.<br/>
7378

7479
{{< caution >}}
7580
Flags that you specify from the command line override default values and any corresponding environment variables.
@@ -79,19 +84,29 @@ If you need help, run `kubectl help` from the terminal window.
7984

8085
## In-cluster authentication and namespace overrides
8186

82-
By default `kubectl` will first determine if it is running within a pod, and thus in a cluster. It starts by checking for the `KUBERNETES_SERVICE_HOST` and `KUBERNETES_SERVICE_PORT` environment variables and the existence of a service account token file at `/var/run/secrets/kubernetes.io/serviceaccount/token`. If all three are found in-cluster authentication is assumed.
87+
By default `kubectl` will first determine if it is running within a pod, and thus in a cluster.
88+
It starts by checking for the `KUBERNETES_SERVICE_HOST` and `KUBERNETES_SERVICE_PORT` environment
89+
variables and the existence of a service account token file at `/var/run/secrets/kubernetes.io/serviceaccount/token`.
90+
If all three are found in-cluster authentication is assumed.
8391

84-
To maintain backwards compatibility, if the `POD_NAMESPACE` environment variable is set during in-cluster authentication it will override the default namespace from the service account token. Any manifests or tools relying on namespace defaulting will be affected by this.
92+
To maintain backwards compatibility, if the `POD_NAMESPACE` environment variable is set
93+
during in-cluster authentication it will override the default namespace from the
94+
service account token. Any manifests or tools relying on namespace defaulting will be affected by this.
8595

8696
**`POD_NAMESPACE` environment variable**
8797

88-
If the `POD_NAMESPACE` environment variable is set, cli operations on namespaced resources will default to the variable value. For example, if the variable is set to `seattle`, `kubectl get pods` would return pods in the `seattle` namespace. This is because pods are a namespaced resource, and no namespace was provided in the command. Review the output of `kubectl api-resources` to determine if a resource is namespaced.
98+
If the `POD_NAMESPACE` environment variable is set, cli operations on namespaced resources
99+
will default to the variable value. For example, if the variable is set to `seattle`,
100+
`kubectl get pods` would return pods in the `seattle` namespace. This is because pods are
101+
a namespaced resource, and no namespace was provided in the command. Review the output
102+
of `kubectl api-resources` to determine if a resource is namespaced.
89103

90-
Explicit use of `--namespace <value>` overrides this behavior.
104+
Explicit use of `--namespace <value>` overrides this behavior.
91105

92106
**How kubectl handles ServiceAccount tokens**
93107

94108
If:
109+
95110
* there is Kubernetes service account token file mounted at
96111
`/var/run/secrets/kubernetes.io/serviceaccount/token`, and
97112
* the `KUBERNETES_SERVICE_HOST` environment variable is set, and
@@ -230,11 +245,15 @@ The following table includes a list of all the supported resource types and thei
230245

231246
## Output options
232247

233-
Use the following sections for information about how you can format or sort the output of certain commands. For details about which commands support the various output options, see the [kubectl](/docs/reference/kubectl/kubectl/) reference documentation.
248+
Use the following sections for information about how you can format or sort the output
249+
of certain commands. For details about which commands support the various output options,
250+
see the [kubectl](/docs/reference/kubectl/kubectl/) reference documentation.
234251

235252
### Formatting output
236253

237-
The default output format for all `kubectl` commands is the human readable plain-text format. To output details to your terminal window in a specific format, you can add either the `-o` or `--output` flags to a supported `kubectl` command.
254+
The default output format for all `kubectl` commands is the human readable plain-text format.
255+
To output details to your terminal window in a specific format, you can add either the `-o`
256+
or `--output` flags to a supported `kubectl` command.
238257

239258
#### Syntax
240259

@@ -324,7 +343,9 @@ pod-name 1m
324343

325344
### Sorting list objects
326345

327-
To output objects to a sorted list in your terminal window, you can add the `--sort-by` flag to a supported `kubectl` command. Sort your objects by specifying any numeric or string field with the `--sort-by` flag. To specify a field, use a [jsonpath](/docs/reference/kubectl/jsonpath/) expression.
346+
To output objects to a sorted list in your terminal window, you can add the `--sort-by` flag
347+
to a supported `kubectl` command. Sort your objects by specifying any numeric or string field
348+
with the `--sort-by` flag. To specify a field, use a [jsonpath](/docs/reference/kubectl/jsonpath/) expression.
328349

329350
#### Syntax
330351

@@ -508,10 +529,12 @@ The following kubectl-compatible plugins are available:
508529

509530
`kubectl plugin list` also warns you about plugins that are not
510531
executable, or that are shadowed by other plugins; for example:
532+
511533
```shell
512534
sudo chmod -x /usr/local/bin/kubectl-foo # remove execute permission
513535
kubectl plugin list
514536
```
537+
515538
```
516539
The following kubectl-compatible plugins are available:
517540
@@ -529,8 +552,10 @@ of the existing kubectl commands:
529552
```shell
530553
cat ./kubectl-whoami
531554
```
555+
532556
The next few examples assume that you already made `kubectl-whoami` have
533557
the following contents:
558+
534559
```shell
535560
#!/bin/bash
536561

0 commit comments

Comments
 (0)