温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

如何编译banzaicloud/kafka-operator

发布时间:2021-12-07 13:46:51 来源:亿速云 阅读:141 作者:小新 栏目:云计算

小编给大家分享一下如何编译banzaicloud/kafka-operator,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!

[root@k8s-tcm1:/opt/k8s/kafka-operator]# make deploy        
which: no controller-gen in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/go/bin)
go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.2.0
go: finding sigs.k8s.io v0.2.0
go: finding sigs.k8s.io/controller-tools/cmd/controller-gen v0.2.0
go: finding sigs.k8s.io/controller-tools/cmd v0.2.0
go: finding sigs.k8s.io/controller-tools v0.2.0
go: downloading sigs.k8s.io/controller-tools v0.2.0
go: extracting sigs.k8s.io/controller-tools v0.2.0
go: downloading sigs.k8s.io/controller-tools v0.2.0-beta.4
go: extracting sigs.k8s.io/controller-tools v0.2.0-beta.4
go: downloading k8s.io/apimachinery v0.0.0-20190404173353-6a84e37a896d
go: downloading github.com/spf13/cobra v0.0.5
go: downloading golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac
go: downloading k8s.io/api v0.0.0-20190409021203-6e4e0e4f393b
go: downloading sigs.k8s.io/yaml v1.1.0
go: downloading k8s.io/apiextensions-apiserver v0.0.0-20190409022649-727a075fdec8
go: downloading github.com/fatih/color v1.7.0
go: downloading github.com/gobuffalo/flect v0.1.5
go: extracting sigs.k8s.io/yaml v1.1.0
go: downloading gopkg.in/yaml.v2 v2.2.2
go: extracting github.com/fatih/color v1.7.0
go: downloading github.com/mattn/go-isatty v0.0.8
go: extracting github.com/spf13/cobra v0.0.5
go: downloading github.com/inconshreveable/mousetrap v1.0.0
go: extracting github.com/gobuffalo/flect v0.1.5
go: downloading github.com/spf13/pflag v1.0.3
go: extracting github.com/spf13/pflag v1.0.3
go: downloading github.com/mattn/go-colorable v0.1.2
go: extracting github.com/inconshreveable/mousetrap v1.0.0
go: extracting gopkg.in/yaml.v2 v2.2.2
go: extracting github.com/mattn/go-isatty v0.0.8
go: downloading golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a
go: extracting k8s.io/apiextensions-apiserver v0.0.0-20190409022649-727a075fdec8
go: extracting github.com/mattn/go-colorable v0.1.2
go: downloading github.com/gogo/protobuf v1.2.2-0.20190730201129-28a6bbf47e48
go: extracting github.com/gogo/protobuf v1.2.2-0.20190730201129-28a6bbf47e48
go: extracting golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a
go: extracting golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac
go: extracting k8s.io/api v0.0.0-20190409021203-6e4e0e4f393b
go: extracting k8s.io/apimachinery v0.0.0-20190404173353-6a84e37a896d
go: downloading github.com/google/gofuzz v1.0.0
go: downloading k8s.io/klog v0.4.0
go: downloading gopkg.in/inf.v0 v0.9.1
go: downloading golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7
go: extracting github.com/google/gofuzz v1.0.0
go: extracting gopkg.in/inf.v0 v0.9.1
go: extracting k8s.io/klog v0.4.0
go: extracting golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7
go: downloading golang.org/x/text v0.3.2
go: extracting golang.org/x/text v0.3.2
go: finding github.com/gobuffalo/flect v0.1.5
go: finding github.com/spf13/cobra v0.0.5
go: finding golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac
go: finding k8s.io/apiextensions-apiserver v0.0.0-20190409022649-727a075fdec8
go: finding k8s.io/apimachinery v0.0.0-20190404173353-6a84e37a896d
go: finding github.com/fatih/color v1.7.0
go: finding k8s.io/api v0.0.0-20190409021203-6e4e0e4f393b
go: finding github.com/spf13/pflag v1.0.3
go: finding github.com/mattn/go-colorable v0.1.2
go: finding github.com/mattn/go-isatty v0.0.8
go: finding github.com/gogo/protobuf v1.2.2-0.20190730201129-28a6bbf47e48
go: finding sigs.k8s.io/yaml v1.1.0
go: finding github.com/google/gofuzz v1.0.0
go: finding gopkg.in/inf.v0 v0.9.1
go: finding golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a
go: finding gopkg.in/yaml.v2 v2.2.2
go: finding k8s.io/klog v0.4.0
go: finding golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7
go: finding golang.org/x/text v0.3.2
/root/go/bin/controller-gen "crd:trivialVersions=true" rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/base/crds output:rbac:artifacts:config=config/base/rbac output:webhook:artifacts:config=config/base/webhook
bin/kustomize build config | kubectl apply -f -
namespace/kafka created
Warning: kubectl apply should be used on resource created by either kubectl create --save-config or kubectl apply
customresourcedefinition.apiextensions.k8s.io/kafkaclusters.kafka.banzaicloud.io configured
Warning: kubectl apply should be used on resource created by either kubectl create --save-config or kubectl apply
customresourcedefinition.apiextensions.k8s.io/kafkatopics.kafka.banzaicloud.io configured
Warning: kubectl apply should be used on resource created by either kubectl create --save-config or kubectl apply
customresourcedefinition.apiextensions.k8s.io/kafkausers.kafka.banzaicloud.io configured
./scripts/image_patch.sh "config/overlays/specific-manager-version/manager_image_patch.yaml" banzaicloud/kafka-operator:chart/kafka-operator/0.2.9
kustomize build config/overlays/specific-manager-version | kubectl apply -f -
customresourcedefinition.apiextensions.k8s.io/kafkaclusters.kafka.banzaicloud.io configured
customresourcedefinition.apiextensions.k8s.io/kafkatopics.kafka.banzaicloud.io configured
customresourcedefinition.apiextensions.k8s.io/kafkausers.kafka.banzaicloud.io configured
role.rbac.authorization.k8s.io/kafka-operator-certman-proxy-leader-election-role created
clusterrole.rbac.authorization.k8s.io/kafka-operator-certman-proxy-manager-role created
clusterrole.rbac.authorization.k8s.io/kafka-operator-certman-proxy-proxy-role created
rolebinding.rbac.authorization.k8s.io/kafka-operator-certman-proxy-leader-election-rolebinding created
clusterrolebinding.rbac.authorization.k8s.io/kafka-operator-certman-proxy-manager-rolebinding created
clusterrolebinding.rbac.authorization.k8s.io/kafka-operator-certman-proxy-proxy-rolebinding created
service/kafka-operator-certman-proxy-alertmanager created
service/kafka-operator-certman-proxy-controller-manager-metrics-service created
service/kafka-operator-certman-proxy-webhook-service created
deployment.apps/kafka-operator-certman-proxy-controller-manager created
certificate.cert-manager.io/kafka-operator-certman-proxy-serving-cert created
issuer.cert-manager.io/kafka-operator-certman-proxy-selfsigned-issuer created
validatingwebhookconfiguration.admissionregistration.k8s.io/kafka-operator-certman-proxy-validating-webhook-configuration created

编译过程貌似没啥问题,但是实际部署却并不成功:
Events:
Type     Reason         Age                   From               Message


Warning  InspectFailed  10m (x418 over 100m)  kubelet, k8s-tcn3  Failed to apply default image tag "banzaicloud/kafka-operator:chart/kafka-operator/0.2.9": couldn't parse image reference "banzaicloud/kafka-operator:chart/kafka-operator/0.2.9": invalid reference format
Warning  Failed         35s (x464 over 100m)  kubelet, k8s-tcn3  Error: InvalidImageName

看镜像名字和标签,显然哪里出问题了

以上是“如何编译banzaicloud/kafka-operator”这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注亿速云行业资讯频道!

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI