1KUBERNETES(1)(kubernetes)                            KUBERNETES(1)(kubernetes)
2
3
4
5Eric Paris Jan 2015
6
7

NAME

9       kubectl create ingress - Create an ingress with the specified name
10
11
12

SYNOPSIS

14       kubectl create ingress [OPTIONS]
15
16
17

DESCRIPTION

19       Create an ingress with the specified name.
20
21
22

OPTIONS

24       --allow-missing-template-keys=true       If  true, ignore any errors in
25       templates when a field or map key is missing in the template. Only  ap‐
26       plies to golang and jsonpath output formats.
27
28
29       --annotation=[]      Annotation to insert in the ingress object, in the
30       format annotation=value
31
32
33       --class=""      Ingress Class to be used
34
35
36       --default-backend=""      Default service for  backend,  in  format  of
37       svcname:port
38
39
40       --dry-run="none"       Must be "none", "server", or "client". If client
41       strategy, only print the object that would be sent, without sending it.
42       If  server  strategy, submit server-side request without persisting the
43       resource.
44
45
46       --field-manager="kubectl-create"      Name of the manager used to track
47       field ownership.
48
49
50       -o,  --output=""      Output format. One of: (json, yaml, name, go-tem‐
51       plate, go-template-file, template, templatefile, jsonpath, jsonpath-as-
52       json, jsonpath-file).
53
54
55       --rule=[]       Rule in format host/path=service:port[,tls=secretname].
56       Paths containing the leading character '*' are considered pathType=Pre‐
57       fix. tls argument is optional.
58
59
60       --save-config=false       If  true, the configuration of current object
61       will be saved in its annotation. Otherwise, the annotation will be  un‐
62       changed.  This flag is useful when you want to perform kubectl apply on
63       this object in the future.
64
65
66       --show-managed-fields=false      If true, keep the  managedFields  when
67       printing objects in JSON or YAML format.
68
69
70       --template=""      Template string or path to template file to use when
71       -o=go-template, -o=go-template-file. The template format is golang tem‐
72       plates [http://golang.org/pkg/text/template/#pkg-overview].
73
74
75       --validate="strict"      Must be one of: strict (or true), warn, ignore
76       (or false).            "true" or "strict" will use a schema to validate
77       the  input and fail the request if invalid. It will perform server side
78       validation if ServerSideFieldValidation is enabled on  the  api-server,
79       but  will  fall  back  to  less reliable client-side validation if not.
80                 "warn" will warn about unknown or  duplicate  fields  without
81       blocking  the request if server-side field validation is enabled on the
82       API server, and behave as  "ignore"  otherwise.             "false"  or
83       "ignore"  will not perform any schema validation, silently dropping any
84       unknown or duplicate fields.
85
86
87

OPTIONS INHERITED FROM PARENT COMMANDS

89       --as=""      Username to impersonate for the operation. User could be a
90       regular user or a service account in a namespace.
91
92
93       --as-group=[]       Group  to  impersonate for the operation, this flag
94       can be repeated to specify multiple groups.
95
96
97       --as-uid=""      UID to impersonate for the operation.
98
99
100       --azure-container-registry-config=""      Path to the  file  containing
101       Azure container registry configuration information.
102
103
104       --cache-dir="/builddir/.kube/cache"      Default cache directory
105
106
107       --certificate-authority=""      Path to a cert file for the certificate
108       authority
109
110
111       --client-certificate=""      Path to a client certificate file for TLS
112
113
114       --client-key=""      Path to a client key file for TLS
115
116
117       --cluster=""      The name of the kubeconfig cluster to use
118
119
120       --context=""      The name of the kubeconfig context to use
121
122
123       --disable-compression=false      If true, opt-out of response  compres‐
124       sion for all requests to the server
125
126
127       --insecure-skip-tls-verify=false      If true, the server's certificate
128       will not be checked for validity. This will make your HTTPS connections
129       insecure
130
131
132       --kubeconfig=""       Path  to  the  kubeconfig file to use for CLI re‐
133       quests.
134
135
136       --match-server-version=false       Require  server  version  to   match
137       client version
138
139
140       -n,  --namespace=""       If  present, the namespace scope for this CLI
141       request
142
143
144       --password=""      Password for basic authentication to the API server
145
146
147       --profile="none"        Name   of   profile   to   capture.   One    of
148       (none|cpu|heap|goroutine|threadcreate|block|mutex)
149
150
151       --profile-output="profile.pprof"       Name  of  the  file to write the
152       profile to
153
154
155       --request-timeout="0"      The length of time to wait before giving  up
156       on  a  single  server  request. Non-zero values should contain a corre‐
157       sponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't time‐
158       out requests.
159
160
161       -s, --server=""      The address and port of the Kubernetes API server
162
163
164       --tls-server-name=""       Server  name  to  use for server certificate
165       validation. If it is not provided, the hostname  used  to  contact  the
166       server is used
167
168
169       --token=""      Bearer token for authentication to the API server
170
171
172       --user=""      The name of the kubeconfig user to use
173
174
175       --username=""      Username for basic authentication to the API server
176
177
178       --version=false      Print version information and quit
179
180
181       --warnings-as-errors=false      Treat warnings received from the server
182       as errors and exit with a non-zero exit code
183
184
185

EXAMPLE

187                # Create a single ingress called 'simple' that directs requests to foo.com/bar to svc
188                # svc1:8080 with a tls secret "my-cert"
189                kubectl create ingress simple --rule="foo.com/bar=svc1:8080,tls=my-cert"
190
191                # Create a catch all ingress of "/path" pointing to service svc:port and Ingress Class as "otheringress"
192                kubectl create ingress catch-all --class=otheringress --rule="/path=svc:port"
193
194                # Create an ingress with two annotations: ingress.annotation1 and ingress.annotations2
195                kubectl create ingress annotated --class=default --rule="foo.com/bar=svc:port" \
196                --annotation ingress.annotation1=foo \
197                --annotation ingress.annotation2=bla
198
199                # Create an ingress with the same host and multiple paths
200                kubectl create ingress multipath --class=default \
201                --rule="foo.com/=svc:port" \
202                --rule="foo.com/admin/=svcadmin:portadmin"
203
204                # Create an ingress with multiple hosts and the pathType as Prefix
205                kubectl create ingress ingress1 --class=default \
206                --rule="foo.com/path*=svc:8080" \
207                --rule="bar.com/admin*=svc2:http"
208
209                # Create an ingress with TLS enabled using the default ingress certificate and different path types
210                kubectl create ingress ingtls --class=default \
211                --rule="foo.com/=svc:https,tls" \
212                --rule="foo.com/path/subpath*=othersvc:8080"
213
214                # Create an ingress with TLS enabled using a specific secret and pathType as Prefix
215                kubectl create ingress ingsecret --class=default \
216                --rule="foo.com/*=svc:8080,tls=secret1"
217
218                # Create an ingress with a default backend
219                kubectl create ingress ingdefault --class=default \
220                --default-backend=defaultsvc:http \
221                --rule="foo.com/*=svc:8080,tls=secret1"
222
223
224
225

SEE ALSO

227       kubectl-create(1),
228
229
230

HISTORY

232       January 2015, Originally compiled by Eric Paris (eparis at  redhat  dot
233       com)  based  on the kubernetes source material, but hopefully they have
234       been automatically generated since!
235
236
237
238Manuals                              User            KUBERNETES(1)(kubernetes)
Impressum