Unable to run "Harbor" in Kubernetes Cluster

3/10/2020

I'm not able to run "Harbor" viz. an image caching service just like Docker-registry, I'm getting the following error,

error: unable to recognize "harbor.yaml": no matches for kind "Deployment" in version "v1.10.1"

Has anyone been able to run this in a K8s cluster on Ubuntu 16.04 or Ubuntu 18.04?

-- Messy Tech
docker-registry
harbor
kubernetes
kubernetes-helm
kubernetes-pod

2 Answers

3/11/2020

An yaml for deployment should have apiVersion: apps/v1

An easy way to install harbor is using helm from helm hub

-- Arghya Sadhu
Source: StackOverflow

3/11/2020

There is known issue due to changes in k8s API.

See this answer

This means that only apiVersion with apps is correct for Deployments (extensions is not supporting Deployment)

And there is fix in the harbor helm chart Update your configs and check configs.

There is a workaround to fix it manually: replace extensions/v1beta1 to apps/v1

sed -i 's#extensions/v1beta1#apps/v1# *.yaml
-- Yasen
Source: StackOverflow