Welcome to the Linux Foundation Forum!

Lab 4.3 - unable to recognize "complete-demo.yaml": no matches for kind "Deployment"


I've pulled down the config for the sock shop, but cannot run it:

kubectl apply -n sock-shop -f complete-demo.yaml
unable to recognize "complete-demo.yaml": no matches for kind "Deployment" in version "extensions/v1beta1"

I've tried changing the apiVersion to apps/v1beta1 and apps/v1 but that just gives me other errors.

Something I'm doing wrong? Perhaps because I'm running v1.16.0 rather than the course suggested 15.x?


  • dnx
    dnx Posts: 32

    Also, on this, what is the difference between extensions and apps apis, I don't think I've spotted an explanation of this so far?

  • dnx
    dnx Posts: 32

    Managed to get this working, I changed the apiVersion to apps/v1 and then added the now required 'selector' elements to the deploySpec.

  • chrispokorni
    chrispokorni Posts: 2,190

    Hi @dnx,

    You experienced first hand how fast things change in Kubernetes, and how some features no longer work as expected as a result of these changes. This is one of the reasons why the lab exercises are written and tested on a particular Kubernetes release - in this case v1.15.1.

    However, good troubleshooting work! I am glad you found a workaround for the two API groups issue. As a feature matures in Kubernetes, it transitions between various API groups, which are representative of the feature's level of maturity.
    The API resource "Deployment" started as part of the extensions/ API group, but in recent Kubernetes releases, it transitioned into the newer apps/ API group, with the extensions/ group being marked to be deprecated. For a while, both API groups were supported. But it looks like we finally reached the point where the extensions/ group is no longer being supported.
    Thanks for reporting the issues. It will be corrected in a future course update release.


  • key
    key Posts: 1
    edited October 2019

    You cannot start sock-shop in Kubernetes 1.16 version because of deprecated APIs , but you can convert it :smile:

    cd microservices-demo/deploy/kubernetes 
    kubectl create namespace sock-shop
    kubectl convert -f . | kubectl create -f -
    watch kubectl get pods -n sock-shop
    # wait for all in status Running
    kubectl describe svc front-end -n sock-shop
  • lyubimova
    lyubimova Posts: 1
    edited October 2019

    You have to modify each deployment section as this


Upcoming Training