通过在 GKE 上设置一个带有通量的 webhook 接收器,我一直在弄脏我的手,我按照本指南的说明进行操作。根据它,我需要部署 Git 存储库接收器,如下所示:
apiVersion: notification.toolkit.fluxcd.io/v1beta1
kind: Receiver
metadata:
name: webapp
namespace: flux-system
spec:
type: github
events:
- "ping"
- "push"
secretRef:
name: webhook-token
resources:
- kind: GitRepository
name: webapp
当我在 k8s 版本 1.18.12 的 gke 集群上应用相同的内容时,我收到以下错误
prkumar@cloudshell:~ (portworx-eng)$ kubectl apply -f GitRepository.yml
error: unable to recognize "GitRepository.yml": no matches for kind "Receiver" in version "notification.toolkit.fluxcd.io/v1beta1"
我试图检查 CRD 是否存在,但我找不到任何东西:
prkumar@cloudshell:~ (portworx-eng)$ kubectl get customresourcedefinitions --all-namespaces
NAME CREATED AT
actionapprovals.autopilot.libopenstorage.org 2021-02-15T16:22:04Z
applicationbackups.stork.libopenstorage.org 2021-02-15T16:22:32Z
applicationbackupschedules.stork.libopenstorage.org 2021-02-15T16:22:47Z
applicationclones.stork.libopenstorage.org 2021-02-15T16:22:42Z
applicationregistrations.stork.libopenstorage.org 2021-02-15T16:22:27Z
applicationrestores.stork.libopenstorage.org 2021-02-15T16:22:37Z
autopilotruleobjects.autopilot.libopenstorage.org 2021-02-15T16:21:59Z
autopilotrules.autopilot.libopenstorage.org 2021-02-15T16:21:59Z
backendconfigs.cloud.google.com 2021-02-15T15:35:57Z
backuplocations.stork.libopenstorage.org 2021-02-15T16:22:22Z
clusterdomainsstatuses.stork.libopenstorage.org 2021-02-15T16:22:12Z
clusterdomainupdates.stork.libopenstorage.org 2021-02-15T16:22:17Z
clusterpairs.stork.libopenstorage.org 2021-02-15T16:21:57Z
frontendconfigs.networking.gke.io 2021-02-15T15:35:59Z
groupvolumesnapshots.stork.libopenstorage.org 2021-02-15T16:21:51Z
managedcertificates.networking.gke.io 2021-02-15T15:35:22Z
migrations.stork.libopenstorage.org 2021-02-15T16:22:02Z
migrationschedules.stork.libopenstorage.org 2021-02-15T16:22:07Z
rules.stork.libopenstorage.org 2021-02-15T16:21:31Z
schedulepolicies.stork.libopenstorage.org 2021-02-15T16:21:36Z
servicenetworkendpointgroups.networking.gke.io 2021-02-15T15:35:59Z
storagestates.migration.k8s.io 2021-02-15T15:35:26Z
storageversionmigrations.migration.k8s.io 2021-02-15T15:35:26Z
updateinfos.nodemanagement.gke.io 2021-02-15T15:35:27Z
volumeplacementstrategies.portworx.io 2021-02-15T16:20:24Z
volumesnapshotclasses.snapshot.storage.k8s.io 2021-02-15T15:35:25Z
volumesnapshotcontents.snapshot.storage.k8s.io 2021-02-15T15:35:25Z
volumesnapshotdatas.volumesnapshot.external-storage.k8s.io 2021-02-15T16:21:41Z
volumesnapshotrestores.stork.libopenstorage.org 2021-02-15T16:21:46Z
volumesnapshots.snapshot.storage.k8s.io 2021-02-15T15:35:25Z
volumesnapshots.volumesnapshot.external-storage.k8s.io 2021-02-15T16:21:41Z
volumesnapshotschedules.stork.libopenstorage.org 2021-02-15T16:21:41Z
prkumar@cloudshell:~ (portworx-eng)$
豆荚
prkumar@cloudshell:~ (portworx-eng)$ kubectl get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
demo podinfo-58df84dbff-4wcl4 1/1 Running 0 9h
demo podinfo-58df84dbff-54rbg 1/1 Running 0 9h
flux flux-86845fff46-p6bdz 1/1 Running 0 9h
flux memcached-5bd7849b84-k4g2h 1/1 Running 0 9h
kube-system autopilot-859d58c8c4-x59b6 1/1 Running 0 10h
kube-system event-exporter-gke-564fb97f9-2l4fp 2/2 Running 0 10h
kube-system fluentbit-gke-j42rm 2/2 Running 0 10h
kube-system fluentbit-gke-ngv2c 2/2 Running 0 10h
kube-system fluentbit-gke-zqjk4 2/2 Running 0 10h
kube-system gke-metrics-agent-n7255 1/1 Running 0 10h
kube-system gke-metrics-agent-rbc2b 1/1 Running 1 10h
kube-system gke-metrics-agent-wmndz 1/1 Running 0 10h
kube-system kube-dns-6bd88c9b66-dtn5c 4/4 Running 0 10h
kube-system kube-dns-6bd88c9b66-jkq6w 4/4 Running 0 10h
kube-system kube-dns-autoscaler-7f89fb6b79-6bbn2 1/1 Running 0 10h
kube-system kube-proxy-gke-prashanth-cluster-te-default-pool-28f88aed-0jhg 1/1 Running 0 10h
kube-system kube-proxy-gke-prashanth-cluster-te-default-pool-28f88aed-3k7t 1/1 Running 0 10h
kube-system kube-proxy-gke-prashanth-cluster-te-default-pool-28f88aed-hrxd 1/1 Running 0 10h
kube-system l7-default-backend-7fd66b8b88-7h8jj 1/1 Running 0 10h
非常欢迎任何帮助或建议。
-普拉桑特