resolving conflicts

This commit is contained in:
Savitha Raghunathan
2020-08-23 12:13:37 -04:00
504 changed files with 16169 additions and 11399 deletions
@@ -669,7 +669,7 @@ rules:
```
Extra fields are evaluated as sub-resources of the resource "userextras". To
allow a user to use impersonation headers for the extra field "scopes," a user
allow a user to use impersonation headers for the extra field "scopes", a user
should be granted the following role:
```yaml
@@ -2,7 +2,7 @@
title: API server
id: kube-apiserver
date: 2018-04-12
full_link: /docs/reference/generated/kube-apiserver/
full_link: /docs/concepts/overview/components/#kube-apiserver
short_description: >
Control plane component that serves the Kubernetes API.
+18 -28
View File
@@ -12,17 +12,11 @@ card:
<!-- overview -->
See also: [Kubectl Overview](/docs/reference/kubectl/overview/) and [JsonPath Guide](/docs/reference/kubectl/jsonpath).
This page is an overview of the `kubectl` command.
This page contains a list of commonly used `kubectl` commands and flags.
<!-- body -->
# kubectl - Cheat Sheet
## Kubectl Autocomplete
## Kubectl autocomplete
### BASH
@@ -31,7 +25,7 @@ source <(kubectl completion bash) # setup autocomplete in bash into the current
echo "source <(kubectl completion bash)" >> ~/.bashrc # add autocomplete permanently to your bash shell.
```
You can also use a shorthand alias for `kubectl` that also works with completion:
You can also use a shorthand alias for `kubectl` that also works with completion:
```bash
alias k=kubectl
@@ -45,7 +39,7 @@ source <(kubectl completion zsh) # setup autocomplete in zsh into the current s
echo "[[ $commands[kubectl] ]] && source <(kubectl completion zsh)" >> ~/.zshrc # add autocomplete permanently to your zsh shell
```
## Kubectl Context and Configuration
## Kubectl context and configuration
Set which Kubernetes cluster `kubectl` communicates with and modifies configuration
information. See [Authenticating Across Clusters with kubeconfig](/docs/tasks/access-application-cluster/configure-access-multiple-clusters/) documentation for
@@ -77,14 +71,15 @@ kubectl config set-context --current --namespace=ggckad-s2
# set a context utilizing a specific username and namespace.
kubectl config set-context gce --user=cluster-admin --namespace=foo \
&& kubectl config use-context gce
kubectl config unset users.foo # delete user foo
```
## Apply
## Kubectl apply
`apply` manages applications through files defining Kubernetes resources. It creates and updates resources in a cluster through running `kubectl apply`. This is the recommended way of managing Kubernetes applications on production. See [Kubectl Book](https://kubectl.docs.kubernetes.io).
## Creating Objects
## Creating objects
Kubernetes manifests can be defined in YAML or JSON. The file extension `.yaml`,
`.yml`, and `.json` can be used.
@@ -138,7 +133,7 @@ EOF
```
## Viewing, Finding Resources
## Viewing, finding resources
```bash
# Get commands with basic output
@@ -213,8 +208,7 @@ kubectl get nodes -o json | jq -c 'path(..)|[.[]|tostring]|join(".")'
kubectl get pods -o json | jq -c 'path(..)|[.[]|tostring]|join(".")'
```
## Updating Resources
## Updating resources
```bash
kubectl set image deployment/frontend www=image:v2 # Rolling update "www" containers of "frontend" deployment, updating the image
@@ -241,7 +235,7 @@ kubectl annotate pods my-pod icon-url=http://goo.gl/XXBTWq # Add an annota
kubectl autoscale deployment foo --min=2 --max=10 # Auto scale a deployment "foo"
```
## Patching Resources
## Patching resources
```bash
# Partially update a node
@@ -260,7 +254,8 @@ kubectl patch deployment valid-deployment --type json -p='[{"op": "remove", "
kubectl patch sa default --type='json' -p='[{"op": "add", "path": "/secrets/1", "value": {"name": "whatever" } }]'
```
## Editing Resources
## Editing resources
Edit any API resource in your preferred editor.
```bash
@@ -268,7 +263,7 @@ kubectl edit svc/docker-registry # Edit the service named d
KUBE_EDITOR="nano" kubectl edit svc/docker-registry # Use an alternative editor
```
## Scaling Resources
## Scaling resources
```bash
kubectl scale --replicas=3 rs/foo # Scale a replicaset named 'foo' to 3
@@ -277,7 +272,7 @@ kubectl scale --current-replicas=2 --replicas=3 deployment/mysql # If the deplo
kubectl scale --replicas=5 rc/foo rc/bar rc/baz # Scale multiple replication controllers
```
## Deleting Resources
## Deleting resources
```bash
kubectl delete -f ./pod.json # Delete a pod using the type and name specified in pod.json
@@ -313,7 +308,7 @@ kubectl exec my-pod -c my-container -- ls / # Run command in existing po
kubectl top pod POD_NAME --containers # Show metrics for a given pod and its containers
```
## Interacting with Nodes and Cluster
## Interacting with Nodes and cluster
```bash
kubectl cordon my-node # Mark my-node as unschedulable
@@ -393,17 +388,12 @@ Verbosity | Description
`--v=8` | Display HTTP request contents.
`--v=9` | Display HTTP request contents without truncation of contents.
## {{% heading "whatsnext" %}}
* Learn more about [Overview of kubectl](/docs/reference/kubectl/overview/).
* Read the [kubectl overview](/docs/reference/kubectl/overview/) and learn about [JsonPath](/docs/reference/kubectl/jsonpath).
* See [kubectl](/docs/reference/kubectl/kubectl/) options.
* Also [kubectl Usage Conventions](/docs/reference/kubectl/conventions/) to understand how to use it in reusable scripts.
* Also read [kubectl Usage Conventions](/docs/reference/kubectl/conventions/) to understand how to use kubectl in reusable scripts.
* See more community [kubectl cheatsheets](https://github.com/dennyzhang/cheatsheet-kubernetes-A4).
+15 -2
View File
@@ -13,7 +13,17 @@ file and passing its path as a command line argument.
<!-- body -->
## Minimal Configuration
A scheduling Profile allows you to configure the different stages of scheduling
in the {{< glossary_tooltip text="kube-scheduler" term_id="kube-scheduler" >}}.
Each stage is exposed in a extension point. Plugins provide scheduling behaviors
by implementing one or more of these extension points.
You can specify scheduling profiles by running `kube-scheduler --config <filename>`,
using the component config APIs
([`v1alpha1`](https://pkg.go.dev/k8s.io/kube-scheduler@v0.18.0/config/v1alpha1?tab=doc#KubeSchedulerConfiguration)
or [`v1alpha2`](https://pkg.go.dev/k8s.io/kube-scheduler@v0.18.0/config/v1alpha2?tab=doc#KubeSchedulerConfiguration)).
The `v1alpha2` API allows you to configure kube-scheduler to run
[multiple profiles](#multiple-profiles).
A minimal configuration looks as follows:
@@ -90,6 +100,10 @@ for that extension point. This can also be used to rearrange plugins order, if
desired.
### Scheduling plugins
1. `UnReserve`: This is an informational extension point that is called if
a Pod is rejected after being reserved and put on hold by a `Permit` plugin.
## Scheduling plugins
The following plugins, enabled by default, implement one or more of these
extension points:
@@ -236,4 +250,3 @@ only has one pending pods queue.
* Read the [kube-scheduler reference](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-scheduler/)
* Learn about [scheduling](/docs/concepts/scheduling-eviction/kube-scheduler/)