步骤 8:安装 cert-manager

本步骤介绍如何下载并安装 Apigee Hybrid 运行所需的 cert-manager

安装 cert-manager

  1. 使用以下命令从 GitHub 安装 cert-manager v1.11.1。
    kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.11.1/cert-manager.yaml

    您应该会看到一个响应,表明已创建 cert-manager 命名空间和多个 cert-manager 资源。例如:

    customresourcedefinition.apiextensions.k8s.io/certificaterequests.cert-manager.io configured
    customresourcedefinition.apiextensions.k8s.io/certificates.cert-manager.io configured
    ...
    mutatingwebhookconfiguration.admissionregistration.k8s.io/cert-manager-webhook configured
    validatingwebhookconfiguration.admissionregistration.k8s.io/cert-manager-webhook configured
    
  2. 使用以下命令验证是否成功创建了 cert-manager 命名空间及其相应组件:
    kubectl get all -n cert-manager -o wide

    输出应类似于以下示例。 您应该会看到 cert-managercert-manager-cainjectorcert-manager-webhook 的 pod。

      NAME                                         READY    STATUS   RESTARTS   AGE     IP           NODE                                    NOMINATED NODE   READINESS GATES
      pod/cert-manager-abcd1234-7hkt9               1/1     Running   0          35s   10.20.x.x    gke-hybrid-on-apigee-data-abcd1234-3d54              
      pod/cert-manager-cainjector-abcd1234-6lb4k    1/1     Running   0          35s   10.20.x.x    gke-hybrid-apigee-runtime-abcd1234-5hmn              
      pod/cert-manager-webhook-abcd1234-c8bg9       1/1     Running   0          35s   10.20.x.x    gke-hybrid-apigee-runtime-abcd1234-fk39              
    
      NAME                           TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)    AGE   SELECTOR
      service/cert-manager           ClusterIP   10.24.x.x              9402/TCP   35s   app.kubernetes.io/component=controller,app.kubernetes.io/instance=cert-manager,app.kubernetes.io/name=cert-manager
      service/cert-manager-webhook   ClusterIP   10.24.x.x              443/TCP    35s   app.kubernetes.io/component=webhook,app.kubernetes.io/instance=cert-manager,app.kubernetes.io/name=webhook
    
      NAME                                      READY   UP-TO-DATE   AVAILABLE   AGE   CONTAINERS                IMAGES                                             SELECTOR
      deployment.apps/cert-manager              1/1     1            1           35s   cert-manager-controller   quay.io/jetstack/cert-manager-controller:v1.11.0   app.kubernetes.io/component=controller,app.kubernetes.io/instance=cert-manager,app.kubernetes.io/name=cert-manager
      deployment.apps/cert-manager-cainjector   1/1     1            1           35s   cert-manager-cainjector   quay.io/jetstack/cert-manager-cainjector:v1.11.0   app.kubernetes.io/component=cainjector,app.kubernetes.io/instance=cert-manager,app.kubernetes.io/name=cainjector
      deployment.apps/cert-manager-webhook      1/1     1            1           35s   cert-manager-webhook      quay.io/jetstack/cert-manager-webhook:v1.11.0      app.kubernetes.io/component=webhook,app.kubernetes.io/instance=cert-manager,app.kubernetes.io/name=webhook
    
      NAME                                                DESIRED   CURRENT   READY   AGE   CONTAINERS                IMAGES                                             SELECTOR
      replicaset.apps/cert-manager-abcd1234                1         1         1       35s   cert-manager-controller   quay.io/jetstack/cert-manager-controller:v1.11.0   app.kubernetes.io/component=controller,app.kubernetes.io/instance=cert-manager,app.kubernetes.io/name=cert-manager,pod-template-hash=abcd1234
      replicaset.apps/cert-manager-cainjector-abcd1234     1         1         1       35s   cert-manager-cainjector   quay.io/jetstack/cert-manager-cainjector:v1.11.0   app.kubernetes.io/component=cainjector,app.kubernetes.io/instance=cert-manager,app.kubernetes.io/name=cainjector,pod-template-hash=abcd1234
      replicaset.apps/cert-manager-webhook-abcd1234        1         1         1       35s   cert-manager-webhook      quay.io/jetstack/cert-manager-webhook:v1.11.0      app.kubernetes.io/component=webhook,app.kubernetes.io/instance=cert-manager,app.kubernetes.io/name=webhook,pod-template-hash=abcd1234

摘要

您现在已经安装了 cert-manager,接下来可以安装 Apigee Hybrid 自定义资源定义 (CRD) 了。

1 2 3 4 5 6 7 8 (下一步)第 9 步:安装 CRD 10 11 12