如何在openshift中更改证书为oc命令?
由于有几个,我想一次全部更改。
如何更改下面创建的tls ?
我只想更改证书和密钥。
- 创建
oc create route edge test-route
--service=test-service
--insecure-policy=Redirect
--cert=/data/test.crt.pem
--key=/data/test.key.pem
--ca-cert=/data/test/ca-chain-bundle.pem
--hostname=test.aaaa.com
--port 8080
-n test
这可以通过patch
实现。
但是,你必须小心换行。
oc patch route test-route -p "{"spec":{"tls":{"certificate": "-----BEGIN CERTIFICATE-----n..........n-----END CERTIFICATE-----", "key": ""}}}" -n test