mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-03-15 07:02:59 -04:00
Automatic merge from submit-queue fix --local flag for kubectl commands Fixes https://github.com/kubernetes/kubernetes/issues/47079 **Release note**: ```release-note NONE ``` Fixes the `--local` flag for `kubectl set ...` sub-commands. **As of the 1.7 release**, `PrinterForCommand` was updated to [use a mapper and typer for unstructured objects](https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/util/factory_builder.go#L52), which further prevented the use of `--local` when there was no connection to an api server. **before** (with no connection to a server) ``` $ kubectl set resources -f pod.json --limits=cpu=200m,memory=512Mi --local error: unable to connect to a server to handle "pods": Get https://10.13.137.149:8443/api: dial tcp 10.13.137.149:8443: getsockopt: connection refused ``` **after** (with no connection to a server) ``` $ kubectl set resources -f pod.json --limits=cpu=200m,memory=512Mi --local NAME READY STATUS RESTARTS AGE mypod 0/1 0 <unknown> ``` cc @smarterclayton @fabianofranz |
||
|---|---|---|
| .. | ||
| helpers | ||
| build.sh | ||
| cross.sh | ||
| make-help.sh | ||
| test-cmd-util.sh | ||
| test-cmd.sh | ||
| test-e2e-node.sh | ||
| test-federation-cmd.sh | ||
| test-integration.sh | ||
| test-kubeadm-cmd.sh | ||
| test.sh | ||
| verify.sh | ||
| vet.sh | ||