tmds / dotnet-mssql-ex

1 stars 6 forks source link

Error: no matches for kind "DeploymentConfig" in version "v1" #6

Open lvermeulen opened 5 years ago

lvermeulen commented 5 years ago

I wanted to recreate the SQL Server deployment, but when I execute

oc new-app --template=mssql -p NAME=mssql-insurance -p ACCEPT_EULA=Y -p NAMESPACE=insurance-all -p MEMORY_LIMIT=2Gi

I can see that it's creating the secret, the service and the persistentvolumeclaim, but the deployment config can't be found:

--> Creating resources ... secret "mssql-insurance-secret" created service "mssql-insurance" created persistentvolumeclaim "mssql-insurance-pvc" created error: no matches for kind "DeploymentConfig" in version "v1" --> Failed

Is this a known error? What can I do about it?

neilcameronwhite commented 5 years ago

I had a similar issue, whereby when I run the oc command from my laptop I get that error:

oc  new-app postgresql-persistent  -n test
--> Deploying template "openshift/postgresql-persistent" to project test

     PostgreSQL
     ---------
     PostgreSQL database service, with persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/.

     NOTE: Scaling to more than one replica is not supported. You must have persistent volumes available in your cluster to use this template.

     The following service(s) have been created in your project: postgresql.

            Username: userOXXXXXD
            Password: HYRXXex7BSt
       Database Name: sampledb
      Connection URL: postgresql://postgresql:5432/

     For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/.

     * With parameters:
        * Memory Limit=512Mi
        * Namespace=openshift
        * Database Service Name=postgresql
        * PostgreSQL Connection Username=userOXXXXXD # generated
        * PostgreSQL Connection Password=HYRXXex7BSt # generated
        * PostgreSQL Database Name=sampledb
        * Volume Capacity=1Gi
        * Version of PostgreSQL Image=9.6

--> Creating resources ...
    secret "postgresql" created
    service "postgresql" created
    persistentvolumeclaim "postgresql" created
    error: no matches for kind "DeploymentConfig" in version "v1"
--> Failed

When I run it on an Openshift server it works.

...
--> Creating resources ...
    secret "postgresql" created
    service "postgresql" created
    persistentvolumeclaim "postgresql" created
    deploymentconfig "postgresql" created
--> Success
    Application is not exposed. You can expose services to the outside world by executing one or more of the commands below:
     'oc expose svc/postgresql' 
    Run 'oc status' to view your app.

What I could determine is when I run oc version on my laptop, it is different to that of the server

From Laptop

oc version
oc v3.11.0+0cbc58b
kubernetes v1.10.0+d4cacc0
features: Basic-Auth GSSAPI Kerberos SPNEGO
error: server took too long to respond with version information.

From Server

oc version
oc v3.9.27
kubernetes v1.9.1+a0ce1bc657
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://master-XXXXXXXX:443
openshift v3.9.27
kubernetes v1.9.1+a0ce1bc657
tmds commented 5 years ago

@neilcameronwhite can you create an issue in https://github.com/openshift/origin with this information?

gsaslis commented 5 years ago

FWIW - I had a similar error with an oc 3.11 client (cli) accessing an oc 3.9 server

downgrading openshift-cli to 3.9 fixed this for me ( brew switch openshift-cli 3.9.0 )

karthik1978 commented 5 years ago

I changed the template yaml file from "- apiVersion: v1" to "- apiVersion: apps.openshift.io/v1" and i was able to deploy

goutam1206 commented 5 years ago

@karthik1978 How this worked? It worked for me though, but how? Whats the reason??

VGerris commented 1 year ago

I had the same issue, it seems it is in the API reference :

https://docs.openshift.com/container-platform/4.11/rest_api/workloads_apis/deploymentconfig-apps-openshift-io-v1.html#deploymentconfig-apps-openshift-io-v1

Similar for ProjectRequest : https://docs.okd.io/4.11/rest_api/project_apis/projectrequest-project-openshift-io-v1.html