Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Commit 5e09485

Browse files
Add kubectl create [SUBCOMMAND] pattern
1 parent d3243b8 commit 5e09485

29 files changed

+2576
-17
lines changed

.generated_docs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ docs/man/man1/kubectl-config-use-context.1
2020
docs/man/man1/kubectl-config-view.1
2121
docs/man/man1/kubectl-config.1
2222
docs/man/man1/kubectl-convert.1
23+
docs/man/man1/kubectl-create-namespace.1
24+
docs/man/man1/kubectl-create-secret-docker-registry.1
25+
docs/man/man1/kubectl-create-secret-generic.1
26+
docs/man/man1/kubectl-create-secret.1
2327
docs/man/man1/kubectl-create.1
2428
docs/man/man1/kubectl-delete.1
2529
docs/man/man1/kubectl-describe.1
@@ -58,6 +62,10 @@ docs/user-guide/kubectl/kubectl_config_use-context.md
5862
docs/user-guide/kubectl/kubectl_config_view.md
5963
docs/user-guide/kubectl/kubectl_convert.md
6064
docs/user-guide/kubectl/kubectl_create.md
65+
docs/user-guide/kubectl/kubectl_create_namespace.md
66+
docs/user-guide/kubectl/kubectl_create_secret.md
67+
docs/user-guide/kubectl/kubectl_create_secret_docker-registry.md
68+
docs/user-guide/kubectl/kubectl_create_secret_generic.md
6169
docs/user-guide/kubectl/kubectl_delete.md
6270
docs/user-guide/kubectl/kubectl_describe.md
6371
docs/user-guide/kubectl/kubectl_edit.md

contrib/completions/bash/kubectl

Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,10 +401,204 @@ _kubectl_describe()
401401
must_have_one_noun+=("serviceaccount")
402402
}
403403

404+
_kubectl_create_namespace()
405+
{
406+
last_command="kubectl_create_namespace"
407+
commands=()
408+
409+
flags=()
410+
two_word_flags=()
411+
flags_with_completion=()
412+
flags_completion=()
413+
414+
flags+=("--dry-run")
415+
flags+=("--generator=")
416+
flags+=("--output=")
417+
two_word_flags+=("-o")
418+
flags+=("--output-version=")
419+
flags+=("--save-config")
420+
flags+=("--schema-cache-dir=")
421+
flags+=("--validate")
422+
flags+=("--alsologtostderr")
423+
flags+=("--api-version=")
424+
flags+=("--certificate-authority=")
425+
flags+=("--client-certificate=")
426+
flags+=("--client-key=")
427+
flags+=("--cluster=")
428+
flags+=("--context=")
429+
flags+=("--insecure-skip-tls-verify")
430+
flags+=("--kubeconfig=")
431+
flags+=("--log-backtrace-at=")
432+
flags+=("--log-dir=")
433+
flags+=("--log-flush-frequency=")
434+
flags+=("--logtostderr")
435+
flags+=("--match-server-version")
436+
flags+=("--namespace=")
437+
flags+=("--password=")
438+
flags+=("--server=")
439+
two_word_flags+=("-s")
440+
flags+=("--stderrthreshold=")
441+
flags+=("--token=")
442+
flags+=("--user=")
443+
flags+=("--username=")
444+
flags+=("--v=")
445+
flags+=("--vmodule=")
446+
447+
must_have_one_flag=()
448+
must_have_one_noun=()
449+
}
450+
451+
_kubectl_create_secret_docker-registry()
452+
{
453+
last_command="kubectl_create_secret_docker-registry"
454+
commands=()
455+
456+
flags=()
457+
two_word_flags=()
458+
flags_with_completion=()
459+
flags_completion=()
460+
461+
flags+=("--docker-email=")
462+
flags+=("--docker-password=")
463+
flags+=("--docker-server=")
464+
flags+=("--docker-username=")
465+
flags+=("--dry-run")
466+
flags+=("--generator=")
467+
flags+=("--output=")
468+
two_word_flags+=("-o")
469+
flags+=("--output-version=")
470+
flags+=("--save-config")
471+
flags+=("--schema-cache-dir=")
472+
flags+=("--validate")
473+
flags+=("--alsologtostderr")
474+
flags+=("--api-version=")
475+
flags+=("--certificate-authority=")
476+
flags+=("--client-certificate=")
477+
flags+=("--client-key=")
478+
flags+=("--cluster=")
479+
flags+=("--context=")
480+
flags+=("--insecure-skip-tls-verify")
481+
flags+=("--kubeconfig=")
482+
flags+=("--log-backtrace-at=")
483+
flags+=("--log-dir=")
484+
flags+=("--log-flush-frequency=")
485+
flags+=("--logtostderr")
486+
flags+=("--match-server-version")
487+
flags+=("--namespace=")
488+
flags+=("--password=")
489+
flags+=("--server=")
490+
two_word_flags+=("-s")
491+
flags+=("--stderrthreshold=")
492+
flags+=("--token=")
493+
flags+=("--user=")
494+
flags+=("--username=")
495+
flags+=("--v=")
496+
flags+=("--vmodule=")
497+
498+
must_have_one_flag=()
499+
must_have_one_flag+=("--docker-email=")
500+
must_have_one_flag+=("--docker-password=")
501+
must_have_one_flag+=("--docker-username=")
502+
must_have_one_noun=()
503+
}
504+
505+
_kubectl_create_secret_generic()
506+
{
507+
last_command="kubectl_create_secret_generic"
508+
commands=()
509+
510+
flags=()
511+
two_word_flags=()
512+
flags_with_completion=()
513+
flags_completion=()
514+
515+
flags+=("--dry-run")
516+
flags+=("--from-file=")
517+
flags+=("--from-literal=")
518+
flags+=("--generator=")
519+
flags+=("--output=")
520+
two_word_flags+=("-o")
521+
flags+=("--output-version=")
522+
flags+=("--save-config")
523+
flags+=("--schema-cache-dir=")
524+
flags+=("--type=")
525+
flags+=("--validate")
526+
flags+=("--alsologtostderr")
527+
flags+=("--api-version=")
528+
flags+=("--certificate-authority=")
529+
flags+=("--client-certificate=")
530+
flags+=("--client-key=")
531+
flags+=("--cluster=")
532+
flags+=("--context=")
533+
flags+=("--insecure-skip-tls-verify")
534+
flags+=("--kubeconfig=")
535+
flags+=("--log-backtrace-at=")
536+
flags+=("--log-dir=")
537+
flags+=("--log-flush-frequency=")
538+
flags+=("--logtostderr")
539+
flags+=("--match-server-version")
540+
flags+=("--namespace=")
541+
flags+=("--password=")
542+
flags+=("--server=")
543+
two_word_flags+=("-s")
544+
flags+=("--stderrthreshold=")
545+
flags+=("--token=")
546+
flags+=("--user=")
547+
flags+=("--username=")
548+
flags+=("--v=")
549+
flags+=("--vmodule=")
550+
551+
must_have_one_flag=()
552+
must_have_one_noun=()
553+
}
554+
555+
_kubectl_create_secret()
556+
{
557+
last_command="kubectl_create_secret"
558+
commands=()
559+
commands+=("docker-registry")
560+
commands+=("generic")
561+
562+
flags=()
563+
two_word_flags=()
564+
flags_with_completion=()
565+
flags_completion=()
566+
567+
flags+=("--alsologtostderr")
568+
flags+=("--api-version=")
569+
flags+=("--certificate-authority=")
570+
flags+=("--client-certificate=")
571+
flags+=("--client-key=")
572+
flags+=("--cluster=")
573+
flags+=("--context=")
574+
flags+=("--insecure-skip-tls-verify")
575+
flags+=("--kubeconfig=")
576+
flags+=("--log-backtrace-at=")
577+
flags+=("--log-dir=")
578+
flags+=("--log-flush-frequency=")
579+
flags+=("--logtostderr")
580+
flags+=("--match-server-version")
581+
flags+=("--namespace=")
582+
flags+=("--password=")
583+
flags+=("--server=")
584+
two_word_flags+=("-s")
585+
flags+=("--stderrthreshold=")
586+
flags+=("--token=")
587+
flags+=("--user=")
588+
flags+=("--username=")
589+
flags+=("--v=")
590+
flags+=("--vmodule=")
591+
592+
must_have_one_flag=()
593+
must_have_one_noun=()
594+
}
595+
404596
_kubectl_create()
405597
{
406598
last_command="kubectl_create"
407599
commands=()
600+
commands+=("namespace")
601+
commands+=("secret")
408602

409603
flags=()
410604
two_word_flags=()
Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
.TH "KUBERNETES" "1" " kubernetes User Manuals" "Eric Paris" "Jan 2015" ""
2+
3+
4+
.SH NAME
5+
.PP
6+
kubectl create namespace \- Create a namespace with the specified name.
7+
8+
9+
.SH SYNOPSIS
10+
.PP
11+
\fBkubectl create namespace\fP [OPTIONS]
12+
13+
14+
.SH DESCRIPTION
15+
.PP
16+
Create a namespace with the specified name.
17+
18+
19+
.SH OPTIONS
20+
.PP
21+
\fB\-\-dry\-run\fP=false
22+
If true, only print the object that would be sent, without sending it.
23+
24+
.PP
25+
\fB\-\-generator\fP="namespace/v1"
26+
The name of the API generator to use.
27+
28+
.PP
29+
\fB\-o\fP, \fB\-\-output\fP=""
30+
Output format. One of: json|yaml|wide|name|go\-template=...|go\-template\-file=...|jsonpath=...|jsonpath\-file=... See golang template [
31+
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]] and jsonpath template [
32+
\[la]http://releases.k8s.io/HEAD/docs/user-guide/jsonpath.md\[ra]].
33+
34+
.PP
35+
\fB\-\-output\-version\fP=""
36+
Output the formatted object with the given version (default api\-version).
37+
38+
.PP
39+
\fB\-\-save\-config\fP=false
40+
If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future.
41+
42+
.PP
43+
\fB\-\-schema\-cache\-dir\fP="\~/.kube/schema"
44+
If non\-empty, load/store cached API schemas in this directory, default is '$HOME/.kube/schema'
45+
46+
.PP
47+
\fB\-\-validate\fP=true
48+
If true, use a schema to validate the input before sending it
49+
50+
51+
.SH OPTIONS INHERITED FROM PARENT COMMANDS
52+
.PP
53+
\fB\-\-alsologtostderr\fP=false
54+
log to standard error as well as files
55+
56+
.PP
57+
\fB\-\-api\-version\fP=""
58+
The API version to use when talking to the server
59+
60+
.PP
61+
\fB\-\-certificate\-authority\fP=""
62+
Path to a cert. file for the certificate authority.
63+
64+
.PP
65+
\fB\-\-client\-certificate\fP=""
66+
Path to a client certificate file for TLS.
67+
68+
.PP
69+
\fB\-\-client\-key\fP=""
70+
Path to a client key file for TLS.
71+
72+
.PP
73+
\fB\-\-cluster\fP=""
74+
The name of the kubeconfig cluster to use
75+
76+
.PP
77+
\fB\-\-context\fP=""
78+
The name of the kubeconfig context to use
79+
80+
.PP
81+
\fB\-\-insecure\-skip\-tls\-verify\fP=false
82+
If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
83+
84+
.PP
85+
\fB\-\-kubeconfig\fP=""
86+
Path to the kubeconfig file to use for CLI requests.
87+
88+
.PP
89+
\fB\-\-log\-backtrace\-at\fP=:0
90+
when logging hits line file:N, emit a stack trace
91+
92+
.PP
93+
\fB\-\-log\-dir\fP=""
94+
If non\-empty, write log files in this directory
95+
96+
.PP
97+
\fB\-\-log\-flush\-frequency\fP=5s
98+
Maximum number of seconds between log flushes
99+
100+
.PP
101+
\fB\-\-logtostderr\fP=true
102+
log to standard error instead of files
103+
104+
.PP
105+
\fB\-\-match\-server\-version\fP=false
106+
Require server version to match client version
107+
108+
.PP
109+
\fB\-\-namespace\fP=""
110+
If present, the namespace scope for this CLI request.
111+
112+
.PP
113+
\fB\-\-password\fP=""
114+
Password for basic authentication to the API server.
115+
116+
.PP
117+
\fB\-s\fP, \fB\-\-server\fP=""
118+
The address and port of the Kubernetes API server
119+
120+
.PP
121+
\fB\-\-stderrthreshold\fP=2
122+
logs at or above this threshold go to stderr
123+
124+
.PP
125+
\fB\-\-token\fP=""
126+
Bearer token for authentication to the API server.
127+
128+
.PP
129+
\fB\-\-user\fP=""
130+
The name of the kubeconfig user to use
131+
132+
.PP
133+
\fB\-\-username\fP=""
134+
Username for basic authentication to the API server.
135+
136+
.PP
137+
\fB\-\-v\fP=0
138+
log level for V logs
139+
140+
.PP
141+
\fB\-\-vmodule\fP=
142+
comma\-separated list of pattern=N settings for file\-filtered logging
143+
144+
145+
.SH EXAMPLE
146+
.PP
147+
.RS
148+
149+
.nf
150+
# Create a new namespace named my\-namespace
151+
$ kubectl create namespace my\-namespace
152+
153+
.fi
154+
.RE
155+
156+
157+
.SH SEE ALSO
158+
.PP
159+
\fBkubectl\-create(1)\fP,
160+
161+
162+
.SH HISTORY
163+
.PP
164+
January 2015, Originally compiled by Eric Paris (eparis at redhat dot com) based on the kubernetes source material, but hopefully they have been automatically generated since!

0 commit comments

Comments
 (0)