Move kubectl ref docs to /docs/reference/. (#6472)

* Move kubectl ref docs to /docs/reference/.

* Update _redirects.
This commit is contained in:
Steve Perry
2017-11-28 18:02:16 -08:00
committed by GitHub
parent dd03bd1b55
commit aa2fe57460
2965 changed files with 15 additions and 443272 deletions
File diff suppressed because one or more lines are too long
@@ -0,0 +1,85 @@
---
title: kubectl
---
kubectl controls the Kubernetes cluster manager.
Find more information at [https://github.com/kubernetes/kubernetes](https://github.com/kubernetes/kubernetes).
```
kubectl
```
### Options
```
--alsologtostderr log to standard error as well as files
--as string Username to impersonate for the operation
--certificate-authority string Path to a cert file for the certificate authority
--client-certificate string Path to a client certificate file for TLS
--client-key string Path to a client key file for TLS
--cluster string The name of the kubeconfig cluster to use
--context string The name of the kubeconfig context to use
--insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
--kubeconfig string Path to the kubeconfig file to use for CLI requests.
--log-backtrace-at traceLocation when logging hits line file:N, emit a stack trace (default :0)
--log-dir string If non-empty, write log files in this directory
--logtostderr log to standard error instead of files
--match-server-version Require server version to match client version
-n, --namespace string If present, the namespace scope for this CLI request
--password string Password for basic authentication to the API server
--request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0")
-s, --server string The address and port of the Kubernetes API server
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
--token string Bearer token for authentication to the API server
--user string The name of the kubeconfig user to use
--username string Username for basic authentication to the API server
-v, --v Level log level for V logs
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
```
### SEE ALSO
* [kubectl annotate](/docs/user-guide/kubectl/{{page.version}}/#annotate) - Update the annotations on a resource
* [kubectl api-versions](/docs/user-guide/kubectl/{{page.version}}/#api-versions) - Print the supported API versions on the server, in the form of "group/version"
* [kubectl apply](/docs/user-guide/kubectl/{{page.version}}/#apply) - Apply a configuration to a resource by filename or stdin
* [kubectl attach](/docs/user-guide/kubectl/{{page.version}}/#attach) - Attach to a running container
* [kubectl autoscale](/docs/user-guide/kubectl/{{page.version}}/#autoscale) - Auto-scale a Deployment, ReplicaSet, or ReplicationController
* [kubectl certificate](/docs/user-guide/kubectl/{{page.version}}/#certificate) - Modify certificate resources.
* [kubectl cluster-info](/docs/user-guide/kubectl/{{page.version}}/#cluster-info) - Display cluster info
* [kubectl completion](/docs/user-guide/kubectl/{{page.version}}/#completion) - Output shell completion code for the given shell (bash or zsh)
* [kubectl config](/docs/user-guide/kubectl/{{page.version}}/#config) - Modify kubeconfig files
* [kubectl convert](/docs/user-guide/kubectl/{{page.version}}/#convert) - Convert config files between different API versions
* [kubectl cordon](/docs/user-guide/kubectl/{{page.version}}/#cordon) - Mark node as unschedulable
* [kubectl cp](/docs/user-guide/kubectl/{{page.version}}/#cp) - Copy files and directories to and from containers.
* [kubectl create](/docs/user-guide/kubectl/{{page.version}}/#create) - Create a resource by filename or stdin
* [kubectl delete](/docs/user-guide/kubectl/{{page.version}}/#delete) - Delete resources by filenames, stdin, resources and names, or by resources and label selector
* [kubectl describe](/docs/user-guide/kubectl/{{page.version}}/#describe) - Show details of a specific resource or group of resources
* [kubectl drain](/docs/user-guide/kubectl/{{page.version}}/#drain) - Drain node in preparation for maintenance
* [kubectl edit](/docs/user-guide/kubectl/{{page.version}}/#edit) - Edit a resource on the server
* [kubectl exec](/docs/user-guide/kubectl/{{page.version}}/#exec) - Execute a command in a container
* [kubectl explain](/docs/user-guide/kubectl/{{page.version}}/#explain) - Documentation of resources
* [kubectl expose](/docs/user-guide/kubectl/{{page.version}}/#expose) - Take a replication controller, service, deployment or pod and expose it as a new Kubernetes Service
* [kubectl get](/docs/user-guide/kubectl/{{page.version}}/#get) - Display one or many resources
* [kubectl label](/docs/user-guide/kubectl/{{page.version}}/#label) - Update the labels on a resource
* [kubectl logs](/docs/user-guide/kubectl/{{page.version}}/#logs) - Print the logs for a container in a pod
* [kubectl options](/docs/user-guide/kubectl/{{page.version}}/#options) -
* [kubectl patch](/docs/user-guide/kubectl/{{page.version}}/#patch) - Update field(s) of a resource using strategic merge patch
* [kubectl port-forward](/docs/user-guide/kubectl/{{page.version}}/#port-forward) - Forward one or more local ports to a pod
* [kubectl proxy](/docs/user-guide/kubectl/{{page.version}}/#proxy) - Run a proxy to the Kubernetes API server
* [kubectl replace](/docs/user-guide/kubectl/{{page.version}}/#replace) - Replace a resource by filename or stdin
* [kubectl rolling-update](/docs/user-guide/kubectl/{{page.version}}/#rolling-update) - Perform a rolling update of the given ReplicationController
* [kubectl rollout](/docs/user-guide/kubectl/{{page.version}}/#rollout) - Manage a deployment rollout
* [kubectl run](/docs/user-guide/kubectl/{{page.version}}/#run) - Run a particular image on the cluster
* [kubectl scale](/docs/user-guide/kubectl/{{page.version}}/#scale) - Set a new size for a Deployment, ReplicaSet, Replication Controller, or Job
* [kubectl set](/docs/user-guide/kubectl/{{page.version}}/#set) - Set specific features on objects
* [kubectl taint](/docs/user-guide/kubectl/{{page.version}}/#taint) - Update the taints on one or more nodes
* [kubectl top](/docs/user-guide/kubectl/{{page.version}}/#top) - Display Resource (CPU/Memory/Storage) usage
* [kubectl uncordon](/docs/user-guide/kubectl/{{page.version}}/#uncordon) - Mark node as schedulable
* [kubectl version](/docs/user-guide/kubectl/{{page.version}}/#version) - Print the client and server version information
###### Auto generated by spf13/cobra on 13-Dec-2016
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl.md?pixel)]()
<!-- END MUNGE: GENERATED_ANALYTICS -->
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,99 @@
/*
Original highlight.js style (c) Ivan Sagalaev <maniac@softwaremaniacs.org>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #F0F0F0;
}
/* Base color: saturation 0; */
.hljs,
.hljs-subst {
color: #444;
}
.hljs-comment {
color: #888888;
}
.hljs-keyword,
.hljs-attribute,
.hljs-selector-tag,
.hljs-meta-keyword,
.hljs-doctag,
.hljs-name {
font-weight: bold;
}
/* User color: hue: 0 */
.hljs-type,
.hljs-string,
.hljs-number,
.hljs-selector-id,
.hljs-selector-class,
.hljs-quote,
.hljs-template-tag,
.hljs-deletion {
color: #880000;
}
.hljs-title,
.hljs-section {
color: #880000;
font-weight: bold;
}
.hljs-regexp,
.hljs-symbol,
.hljs-variable,
.hljs-template-variable,
.hljs-link,
.hljs-selector-attr,
.hljs-selector-pseudo {
color: #BC6060;
}
/* Language color: hue: 90; */
.hljs-literal {
color: #78A960;
}
.hljs-built_in,
.hljs-bullet,
.hljs-code,
.hljs-addition {
color: #397300;
}
/* Meta color: hue: 200 */
.hljs-meta {
color: #1f7199;
}
.hljs-meta-string {
color: #4d99bf;
}
/* Misc effects */
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}
@@ -0,0 +1,7 @@
/**
* Copyright (c) 2007-2015 Ariel Flesler - aflesler<a>gmail<d>com | http://flesler.blogspot.com
* Licensed under MIT
* @author Ariel Flesler
* @version 2.1.2
*/
;(function(f){"use strict";"function"===typeof define&&define.amd?define(["jquery"],f):"undefined"!==typeof module&&module.exports?module.exports=f(require("jquery")):f(jQuery)})(function($){"use strict";function n(a){return!a.nodeName||-1!==$.inArray(a.nodeName.toLowerCase(),["iframe","#document","html","body"])}function h(a){return $.isFunction(a)||$.isPlainObject(a)?a:{top:a,left:a}}var p=$.scrollTo=function(a,d,b){return $(window).scrollTo(a,d,b)};p.defaults={axis:"xy",duration:0,limit:!0};$.fn.scrollTo=function(a,d,b){"object"=== typeof d&&(b=d,d=0);"function"===typeof b&&(b={onAfter:b});"max"===a&&(a=9E9);b=$.extend({},p.defaults,b);d=d||b.duration;var u=b.queue&&1<b.axis.length;u&&(d/=2);b.offset=h(b.offset);b.over=h(b.over);return this.each(function(){function k(a){var k=$.extend({},b,{queue:!0,duration:d,complete:a&&function(){a.call(q,e,b)}});r.animate(f,k)}if(null!==a){var l=n(this),q=l?this.contentWindow||window:this,r=$(q),e=a,f={},t;switch(typeof e){case "number":case "string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(e)){e= h(e);break}e=l?$(e):$(e,q);case "object":if(e.length===0)return;if(e.is||e.style)t=(e=$(e)).offset()}var v=$.isFunction(b.offset)&&b.offset(q,e)||b.offset;$.each(b.axis.split(""),function(a,c){var d="x"===c?"Left":"Top",m=d.toLowerCase(),g="scroll"+d,h=r[g](),n=p.max(q,c);t?(f[g]=t[m]+(l?0:h-r.offset()[m]),b.margin&&(f[g]-=parseInt(e.css("margin"+d),10)||0,f[g]-=parseInt(e.css("border"+d+"Width"),10)||0),f[g]+=v[m]||0,b.over[m]&&(f[g]+=e["x"===c?"width":"height"]()*b.over[m])):(d=e[m],f[g]=d.slice&& "%"===d.slice(-1)?parseFloat(d)/100*n:d);b.limit&&/^\d+$/.test(f[g])&&(f[g]=0>=f[g]?0:Math.min(f[g],n));!a&&1<b.axis.length&&(h===f[g]?f={}:u&&(k(b.onAfterFirst),f={}))});k(b.onAfter)}})};p.max=function(a,d){var b="x"===d?"Width":"Height",h="scroll"+b;if(!n(a))return a[h]-$(a)[b.toLowerCase()]();var b="client"+b,k=a.ownerDocument||a.document,l=k.documentElement,k=k.body;return Math.max(l[h],k[h])-Math.min(l[b],k[b])};$.Tween.propHooks.scrollLeft=$.Tween.propHooks.scrollTop={get:function(a){return $(a.elem)[a.prop]()}, set:function(a){var d=this.get(a);if(a.options.interrupt&&a._last&&a._last!==d)return $(a.elem).stop();var b=Math.round(a.now);d!==b&&($(a.elem)[a.prop](b),a._last=this.get(a))}};return p});
File diff suppressed because one or more lines are too long
+196
View File
@@ -0,0 +1,196 @@
$(document).ready(function() {
/**
* TODO: Refactor with intent toward pure functions. Mutation of state can lead to bugs and difficult debugging.
*/
var toc = navData.toc;
var flatToc = navData.flatToc.reverse();
function collectNodes(tocMap) {
var tocNodes = {};
tocMap.map(function(node, index) {
var sectionNode = $('#' + node.section);
var tocSubsections = {};
tocItem = {section: sectionNode};
var subsectionNodes;
if (node.subsections) {
subsectionNodes = (collectNodes(node.subsections));
tocItem.subsections = subsectionNodes;
}
tocNodes[node.section] = tocItem;
});
return tocNodes;
}
var tocItems = collectNodes(toc);
function collectNodesFlat(tocMap, obj) {
var collect = obj || {};
tocMap.map(function(node, index) {
var sectionNode = $('#' + node.section);
tocItem = {section: sectionNode};
if (node.subsections) {
subsectionNodes = (collectNodesFlat(node.subsections, collect));
}
collect[node.section] = sectionNode;
});
return collect;
}
var tocFlat = collectNodesFlat(toc);
var prevSectionToken;
var prevSubsectionToken;
var activeTokensObj = {};
function scrollActions(scrollPosition) {
var activeSection = checkNodePositions(toc, tocFlat, scrollPosition);
var activeSubSection,
prevL1Nav,
currL1Nav,
prevL2Nav,
currL2Nav;
// No active section - return existing activeTokensObj (may be empty)
if (!activeSection) {
return activeTokensObj;
}
/**
* This block deals with L1Nav sections
*/
// If no previous token, set previous to current active and show L1Nav
if (!prevSectionToken) {
prevSectionToken = activeSection.token;
currL1Nav = getNavNode(activeSection.token);
currL1Nav.show('fast');
}
// If active active is not the same as previous, hide previous L1Nav and show current L1Nav; set previous to current
else if (activeSection.token !== prevSectionToken) {
prevL1Nav = getNavNode(prevSectionToken);
currL1Nav = getNavNode(activeSection.token);
prevL1Nav.hide('fast');
currL1Nav.show('fast');
prevSectionToken = activeSection.token;
}
/**
* This block deals with L2Nav subsections
*/
// If there is a subsections array and it has a non-zero length, set active subsection
if (activeSection.subsections && activeSection.subsections.length !== 0) {
activeSubSection = checkNodePositions(activeSection.subsections, tocFlat, scrollPosition);
if (activeSubSection) {
if (!prevSubsectionToken) {
prevSubsectionToken = activeSubSection.token;
currL2Nav = getNavNode(activeSubSection.token);
currL2Nav.show('fast');
} else if (activeSubSection.token !== prevSubsectionToken) {
prevL2Nav = getNavNode(prevSubsectionToken);
currL2Nav = getNavNode(activeSubSection.token);
prevL2Nav.hide('fast');
currL2Nav.show('fast');
prevSubsectionToken = activeSubSection.token;
}
} else {
prevL2Nav = getNavNode(prevSubsectionToken);
prevL2Nav.hide('fast');
prevSubsectionToken = null;
}
}
activeTokensObj.L1 = prevSectionToken;
activeTokensObj.L2 = prevSubsectionToken;
return activeTokensObj;
}
/**
* Checks for active elements by scroll position
*/
var prevElemToken;
var activeElemToken;
function checkActiveElement(items, scrollPosition) {
var offset = 50;
var offsetScroll = scrollPosition + offset;
var visibleNode;
for (var i = 0; i < items.length; i++) {
var token = items[i];
var node = getHeadingNode(token);
if (offsetScroll >= node.offset().top) {
activeElemToken = token;
}
}
if (!prevElemToken) {
getNavElemNode(activeElemToken).addClass('selected');
prevElemToken = activeElemToken;
return;
}
if (activeElemToken !== prevElemToken) {
getNavElemNode(prevElemToken).removeClass('selected');
getNavElemNode(activeElemToken).addClass('selected');
prevElemToken = activeElemToken;
}
return activeElemToken;
}
function getHeadingNode(token) {
return $('#' + token);
}
function getNavNode(token) {
return $('#' + token + '-nav');
}
function getNavElemNode(token) {
return $('#sidebar-wrapper > ul a[href="#' + token + '"]');
}
function checkNodePositions(nodes, flatNodeMap, scrollPosition) {
var activeNode;
for (var i = 0; i < nodes.length; i++) {
var item = nodes[i];
var node = flatNodeMap[item.section];
var nodeTop = node.offset().top - 50;
if (scrollPosition >= nodeTop) {
activeNode = {token: item.section, node: node};
if (item.subsections) {
activeNode.subsections = item.subsections;
}
break;
}
}
return activeNode;
}
function scrollToNav(token) {
setTimeout(function() {
var scrollPosition = $(window).scrollTop();
var activeSectionTokens = scrollActions(scrollPosition);
var activeElemToken = checkActiveElement(flatToc, scrollPosition);
var navNode = $('#sidebar-wrapper > ul a[href="#' + token + '"]');
$('#sidebar-wrapper').scrollTo(navNode, {duration: 'fast', axis: 'y'});
}, 200);
}
$(window).on('hashchange', function(event) {
var scrollPosition = $(window).scrollTop();
var activeSectionTokens = scrollActions(scrollPosition);
var activeElemToken = checkActiveElement(flatToc, scrollPosition);
var scrollToken = activeSectionTokens.L2 ? activeSectionTokens.L2 : activeSectionTokens.L1;
scrollToNav(scrollToken);
var token = location.hash.slice(1);
});
var scrollPosition = $(window).scrollTop();
scrollActions(scrollPosition);
checkActiveElement(flatToc, scrollPosition);
// TODO: prevent scroll on sidebar from propogating to window
$(window).on('scroll', function(event) {
var scrollPosition = $(window).scrollTop();
var activeSectionTokens = scrollActions(scrollPosition);
var activeElemToken = checkActiveElement(flatToc, scrollPosition);
});
});
@@ -0,0 +1,269 @@
/*
Kubernetes colors
kubernetes blue - rgb(50, 109, 230)
dark blue - rgb(51, 113, 227)
dark grey - rgb(48, 48, 48)
light grey - rgb(161, 160, 158)
*/
/* User agent CSS overrides */
#sidebar-wrapper ul, #sidebar-wrapper li {
margin-left: 10px;
padding-left: 0;
}
/* Inspired by Slate CSS */
.body-content aside {
padding: 1.6em;
margin: 1.8em 0;
background: lightsteelblue;
line-height: 1.6;
border-radius: 15px;
}
.body-content aside.warning {
background-color: peachpuff;
}
.body-content aside.success {
background-color: olivedrab;
}
.body-content aside:before {
vertical-align: middle;
padding-right: 1em;
font-size: 16px;
}
.body-content aside.warning:before, .body-content aside.notice:before, .body-content aside.success:before {
font-family: 'FontAwesome';
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
}
.body-content aside.warning:before {
content: "\f071";
}
.body-content aside.notice:before {
content: "\f05a";
}
.body-content hr {
margin: 2em 0;
border-top: 2px solid dimgrey;
border-bottom: 2px solid antiquewhite;
}
.body-content table {
margin-bottom: 1em;
overflow: auto;
}
.body-content table th, .body-content table td {
text-align: left;
vertical-align: top;
line-height: 1.6;
}
.body-content table th {
padding: 15px 20px;
border-bottom: 1px solid lightsteelblue;
vertical-align: bottom;
}
.body-content table td {
padding: 10px;
}
.body-content table tr:last-child {
border-bottom: 1px solid lightsteelblue;
}
.body-content table tr:nth-child(odd) > td {
background-color: whitesmoke;
}
.body-content table tr:nth-child(even) > td {
background-color: lightsteelblue;
}
.body-content dt {
font-weight: bold;
}
.body-content dd {
margin-left: 15px;
}
.body-content p, .body-content li, .body-content dt, .body-content dd {
line-height: 1.6;
margin-top: 0;
}
/* Brodoc CSS */
body > #wrapper {
display: block;
padding-bottom: 500px;
background-image: linear-gradient(90deg, #FFFFFF 63%, rgb(48, 48, 48) 63%);
}
#sidebar-wrapper {
display: block;
height: 100%;
width: 20%;
position: fixed;
z-index: 1;
top: 0;
left: 0;
background-color: whitesmoke;
border-right: 2px solid slategrey;
overflow-x: hidden;
padding-top: 60px;
}
#sidebar-wrapper a {
text-decoration: none;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
padding: 0 5px;
}
#sidebar-wrapper ul {
list-style: none;
}
#sidebar-wrapper a.selected {
font-style: bold;
color: whitesmoke;
border: 1px solid rgb(161, 160, 158);
background-color: rgb(51, 113, 227);
border-radius: 5px;
}
#sidebar-wrapper .strong-nav {
font-family: monospace;
font-weight: bold;
}
#sidebar-wrapper .nav-level-1.strong-nav {
margin-top: 25px;
}
#sidebar-wrapper .copyright {
padding-left: 10px;
padding-top: 50px;
padding-bottom: 50px;
text-decoration: underline;
}
#page-content-wrapper {
margin-left: 20%;
padding-top: 60px;
}
.body-content h1, .body-content h2 {
width: 52%;
clear: both;
border-bottom: 3px solid lightslategrey;
}
.body-content > h3, .body-content > h4, .body-content > h5, .body-content > h6, .body-content > p, .body-content > aside, .body-content > ul > li, .body-content > ul > li {
width: 52%;
padding-top: 20px;
}
.body-content table {
width: 52%;
}
.body-content table tr td:not(:first-child) {
overflow-wrap: break-word;
word-wrap: break-word;
}
.body-content table tr td a {
word-break: break-word;
}
.body-content p code {
text-overflow: ellipsis;
display: inline-block;
font-size: smaller;
word-break: break-word;
}
.body-content blockquote {
border-left: 0;
border-radius: 5px;
}
.body-content pre.code-block {
margin-bottom: 80px;
}
.body-content blockquote p, .body-content pre {
color: black;
font-size: 13px;
}
.body-content blockquote.code-block {
background: lightsteelblue;
}
.body-content pre.code-block code {
overflow: auto;
overflow-wrap: normal;
word-wrap: normal;
white-space: pre;
}
.code-block {
display: none;
width: 45%;
float: right;
clear: right;
}
.code-block.active {
display: initial;
}
#code-tabs-wrapper {
width: 35%;
height: 60px;
position: fixed;
top: 0;
right: 0;
}
#code-tabs-wrapper .code-tab-list {
float: right;
margin-top: 0;
padding: 0 10px;
}
#code-tabs-wrapper .code-tab {
color: white;
display: inline-block;
padding: 0 30px;
background: rgb(48, 48, 48);
border: 1px solid rgb(161, 160, 158);
border-radius: 5px;
}
#code-tabs-wrapper .tab-selected {
background: rgb(51, 113, 227);
font-style: bold;
border-radius: 5px;
}
.side-nav a {
color: black;
}
@@ -0,0 +1,27 @@
$(document).ready(function() {
var codeTabs = $('#code-tabs-wrapper').find('li');
for (var i = 0; i < codeTabs.length; i++) {
createCodeTabListeners(codeTabs, i);
}
function createCodeTabListeners(codeTabs, index) {
var tab = $(codeTabs[index]),
id = tab.attr('id'),
codeClass = '.' + id;
tab.on('click', function() {
codeTabs.removeClass('tab-selected');
tab.addClass('tab-selected');
$('.code-block').removeClass('active');
$(codeClass).addClass('active');
});
}
function setDefautTab() {
$(codeTabs[0]).addClass('tab-selected');
$('.' + codeTabs[0].id).addClass('active');
}
setDefautTab();
});