2016-01-06 43 views

回答

0

oc new-app example包括:

# Create an application based on a template file, explicitly setting a parameter value 
$ oc new-app --file=./example/myapp/template.json --param=MYSQL_USER=admin 

--param選項很有用在這裏。


注:oc run example包括:

# Start a single instance of nginx, but overload the spec of the replication 
# controller with a partial set of values parsed from JSON. 
$ oc run nginx --image=nginx --overrides='{ "apiVersion": "v1", "spec": { ... } }' 

即JSON可以包括參數部分,如同通過使用sti_incremental.go#L39this one

+0

請原諒我的無知,就是OC新的應用程序之間'的區別'和'跑'? –

+0

@曉鵬我編輯了包含'oc new-app'的答案。 – VonC

0

基於Openshift客戶幫助

oc run -h

oc run NAME --image=image [--env="key=value"] [--port=port] [--replicas=replicas] [--dry-run=bool] [--overrides=inline-json] [--command] -- [COMMAND] [args...] [options]

工作對我來說這樣的:

oc run my_command --image='alpine' --command -- telnet some_server 22

相關問題