You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
kn service create s2 --port 80 --image knativesamples/helloworld
30
+
# Create a service with port 8080
31
+
kn service create s2 --port 8080 --image knativesamples/helloworld
32
+
33
+
# Create a service with port 8080 and port name h2c
34
+
kn service create s2 --port h2c:8080 --image knativesamples/helloworld
32
35
33
36
# Create or replace default resources of a service 's1' using --force flag
34
37
# (earlier configured resource requests and limits will be replaced with default)
@@ -78,7 +81,7 @@ kn service create NAME --image IMAGE
78
81
--no-cluster-local Do not specify that the service be private. (--no-cluster-local will make the service publicly available) (default true)
79
82
--no-lock-to-digest Do not keep the running image for the service constant when not explicitly specifying the image. (--no-lock-to-digest pulls the image tag afresh with each new revision)
80
83
--no-wait Do not wait for 'service create' operation to be completed.
81
-
-p, --port int32The port where application listens on.
84
+
-p, --port string The port where application listens on, in the format 'NAME:PORT', where 'NAME' is optional. Examples: '--port h2c:8080' , '--port 8080'.
82
85
--pull-secret string Image pull secret to set. An empty argument ("") clears the pull secret. The referenced secret must exist in the service's namespace.
83
86
--request strings The resource requirement requests for this Service. For example, 'cpu=100m,memory=256Mi'. You can use this flag multiple times. To unset a resource request, append "-" to the resource name, e.g. '--request cpu-'.
84
87
--requests-cpu string DEPRECATED: please use --request instead. The requested CPU (e.g., 250m).
Copy file name to clipboardExpand all lines: docs/cmd/kn_service_update.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,7 +65,7 @@ kn service update NAME
65
65
--no-cluster-local Do not specify that the service be private. (--no-cluster-local will make the service publicly available) (default true)
66
66
--no-lock-to-digest Do not keep the running image for the service constant when not explicitly specifying the image. (--no-lock-to-digest pulls the image tag afresh with each new revision)
67
67
--no-wait Do not wait for 'service update' operation to be completed.
68
-
-p, --port int32The port where application listens on.
68
+
-p, --port string The port where application listens on, in the format 'NAME:PORT', where 'NAME' is optional. Examples: '--port h2c:8080' , '--port 8080'.
69
69
--pull-secret string Image pull secret to set. An empty argument ("") clears the pull secret. The referenced secret must exist in the service's namespace.
70
70
--request strings The resource requirement requests for this Service. For example, 'cpu=100m,memory=256Mi'. You can use this flag multiple times. To unset a resource request, append "-" to the resource name, e.g. '--request cpu-'.
71
71
--requests-cpu string DEPRECATED: please use --request instead. The requested CPU (e.g., 250m).
command.Flags().Int32VarP(&p.Port, "port", "p", 0, "The port where application listens on.")
210
+
command.Flags().StringVarP(&p.Port, "port", "p", "", "The port where application listens on, in the format 'NAME:PORT', where 'NAME' is optional. Examples: '--port h2c:8080' , '--port 8080'.")
Copy file name to clipboardExpand all lines: pkg/serving/config_changes.go
+29-7Lines changed: 29 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,12 @@ type VolumeSourceType int
40
40
const (
41
41
ConfigMapVolumeSourceTypeVolumeSourceType=iota
42
42
SecretVolumeSourceType
43
+
PortFormatErr="The port specification '%s' is not valid. Please provide in the format 'NAME:PORT', where 'NAME' is optional. Examples: '--port h2c:8080' , '--port 8080'."
0 commit comments