Kuberntes deployment using yaml file

1/6/2020

Can I define DeploymentConfig kind in kuberntes yaml file where api version is of openstack If yes, how?

-- Praful
deployment
kubernetes
yaml

1 Answer

1/6/2020

If I get your question in terms of redhat OpenStack .. You will need OpenShift installed on top of redhat OpenStack

And the API will be as

"apiVersion": "apps.openshift.io/v1",

OpenShift API reference

https://docs.openshift.com/container-platform/3.7/rest_api/apis-apps.openshift.io/v1.DeploymentConfig.html

HTTP REQUEST

POST /apis/apps.openshift.io/v1/deploymentconfigs HTTP/1.1 Authorization: Bearer $TOKEN Accept: application/json Connection: close Content-Type: application/json' { "kind": "DeploymentConfig", "apiVersion": "apps.openshift.io/v1", ... }

CURL REQUEST

$ curl -k \ -X POST \ -d @- \ -H "Authorization: Bearer $TOKEN" \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ https://$ENDPOINT/apis/apps.openshift.io/v1/deploymentconfigs <<'EOF' { "kind": "DeploymentConfig", "apiVersion": "apps.openshift.io/v1", ... } EOF

As reference below is redhat open shifts documents link for deploymentconfig creation

https://docs.openshift.com/container-platform/4.2/applications/deployments/what-deployments-are.html#deployments-and-deploymentconfigs_what-deployments-are

-- DT.
Source: StackOverflow