返回首頁OpenShift

OpenShift 進階功能:ACM、ACS、LDAP、驗證設定完整指南【2026】

19 min 分鐘閱讀
#OpenShift#ACM#ACS#LDAP#安全#多叢集

OpenShift 進階功能:ACM、ACS、LDAP、驗證設定完整指南【2026】

OpenShift 進階功能:ACM、ACS、LDAP、驗證設定完整指南

基本的 OpenShift 叢集建好了,接下來呢?

企業環境需要更多功能:多叢集管理、進階安全、身份驗證整合、自動擴展。這些進階功能是將 OpenShift 從「能用」提升到「好用」的關鍵。

本文涵蓋企業最常用的進階功能設定,幫助你打造真正的企業級容器平台。如果你對 OpenShift 基礎還不熟悉,建議先閱讀 OpenShift 完整指南


多叢集管理(ACM)

ACM 是什麼

Advanced Cluster Management(ACM) 是 Red Hat 的多叢集管理解決方案。當你有 2 個以上的 OpenShift 叢集,ACM 幫你統一管理。

ACM 解決的問題

  • 多個叢集各自管理,設定不一致
  • 應用程式部署到多叢集很麻煩
  • 無法統一監控所有叢集狀態
  • 安全策略難以跨叢集執行

Hub 與 Managed Cluster 架構

ACM 採用 Hub-Spoke 架構:

                    ┌──────────────────┐
                    │    Hub Cluster    │
                    │    (ACM 安裝處)    │
                    └────────┬─────────┘
                             │
         ┌───────────────────┼───────────────────┐
         │                   │                   │
         ▼                   ▼                   ▼
┌────────────────┐  ┌────────────────┐  ┌────────────────┐
│ Managed Cluster │  │ Managed Cluster │  │ Managed Cluster │
│   (生產環境)     │  │   (測試環境)     │  │   (開發環境)     │
└────────────────┘  └────────────────┘  └────────────────┘

Hub Cluster

  • 安裝 ACM Operator
  • 管理所有 Managed Cluster
  • 執行策略和應用程式部署

Managed Cluster

  • 被 Hub 管理的叢集
  • 可以是 OpenShift 或 Kubernetes
  • 自動安裝 klusterlet agent

安裝 ACM

步驟 1:安裝 ACM Operator

# 建立 Namespace
oc create namespace open-cluster-management

# 從 OperatorHub 安裝 ACM
# 或使用 CLI
cat <<EOF | oc apply -f -
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: advanced-cluster-management
  namespace: open-cluster-management
spec:
  channel: release-2.10
  installPlanApproval: Automatic
  name: advanced-cluster-management
  source: redhat-operators
  sourceNamespace: openshift-marketplace
EOF

步驟 2:建立 MultiClusterHub

apiVersion: operator.open-cluster-management.io/v1
kind: MultiClusterHub
metadata:
  name: multiclusterhub
  namespace: open-cluster-management
spec: {}

匯入叢集

從 Web Console 匯入

  1. 進入 ACM Console(Clusters → Infrastructure → Clusters)
  2. 點擊 Import cluster
  3. 輸入叢集名稱和標籤
  4. 複製產生的 YAML
  5. 在目標叢集執行

命令列匯入

# 在 Hub 叢集建立 ManagedCluster
cat <<EOF | oc apply -f -
apiVersion: cluster.open-cluster-management.io/v1
kind: ManagedCluster
metadata:
  name: production-cluster
  labels:
    cloud: AWS
    env: production
spec:
  hubAcceptsClient: true
EOF

策略管理

ACM 的強大之處是 Policy-based Governance

apiVersion: policy.open-cluster-management.io/v1
kind: Policy
metadata:
  name: policy-namespace
  namespace: open-cluster-management
spec:
  remediationAction: enforce  # inform 或 enforce
  disabled: false
  policy-templates:
    - objectDefinition:
        apiVersion: policy.open-cluster-management.io/v1
        kind: ConfigurationPolicy
        metadata:
          name: policy-namespace-prod
        spec:
          remediationAction: enforce
          severity: high
          object-templates:
            - complianceType: musthave
              objectDefinition:
                apiVersion: v1
                kind: Namespace
                metadata:
                  name: production

PlacementRule 決定策略套用範圍

apiVersion: apps.open-cluster-management.io/v1
kind: PlacementRule
metadata:
  name: placement-production
  namespace: open-cluster-management
spec:
  clusterSelector:
    matchLabels:
      env: production

應用程式部署

跨叢集部署應用程式:

apiVersion: app.k8s.io/v1beta1
kind: Application
metadata:
  name: my-app
  namespace: open-cluster-management
spec:
  componentKinds:
    - group: apps.open-cluster-management.io
      kind: Subscription
  selector:
    matchLabels:
      app: my-app
---
apiVersion: apps.open-cluster-management.io/v1
kind: Subscription
metadata:
  name: my-app-subscription
  namespace: open-cluster-management
  labels:
    app: my-app
spec:
  channel: my-channel/my-app-channel
  placement:
    placementRef:
      name: placement-all-clusters
      kind: PlacementRule

插圖:展示 ACM Hub-Spoke 架構。中央是 Hub Cl...

場景描述: 展示 ACM Hub-Spoke 架構。中央是 Hub Cluster(標註 ACM、策略引擎、應用程式部署),周圍環繞多個 Managed Clusters(分別標註不同雲端或環境)。箭頭表示策略下發、應用程式部署、監控資料上傳的流向。

視覺重點:

  • 主要內容清晰呈現

必須出現的元素:

  • 依據描述

需要顯示的中文字:

顏色調性: 專業、清晰

避免元素: 抽象圖形、齒輪

Slug: openshift-acm-hub-spoke-architecture


進階安全(ACS)

ACS 是什麼

Advanced Cluster Security(ACS) 是 Red Hat 的 Kubernetes 原生安全平台。提供從建置到執行時期的完整安全防護。

ACS 核心功能

功能說明
漏洞管理掃描 Container Image 的 CVE
設定管理檢查 K8s 設定是否符合最佳實踐
執行時期防護偵測異常行為和威脅
網路分段視覺化網路流量,偵測異常連線
合規檢查CIS、NIST、PCI-DSS 等標準

安裝 ACS

步驟 1:安裝 ACS Operator

# 建立 Namespace
oc create namespace stackrox

# 安裝 Operator
cat <<EOF | oc apply -f -
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: rhacs-operator
  namespace: openshift-operators
spec:
  channel: stable
  installPlanApproval: Automatic
  name: rhacs-operator
  source: redhat-operators
  sourceNamespace: openshift-marketplace
EOF

步驟 2:部署 Central

apiVersion: platform.stackrox.io/v1alpha1
kind: Central
metadata:
  name: stackrox-central-services
  namespace: stackrox
spec:
  central:
    exposure:
      loadBalancer:
        enabled: false
      nodePort:
        enabled: false
      route:
        enabled: true
    persistence:
      persistentVolumeClaim:
        claimName: stackrox-db
  egress:
    connectivityPolicy: Online
  scanner:
    analyzer:
      scaling:
        autoScaling: Enabled
        maxReplicas: 5
        minReplicas: 2

步驟 3:部署 SecuredCluster

在每個要保護的叢集安裝:

apiVersion: platform.stackrox.io/v1alpha1
kind: SecuredCluster
metadata:
  name: stackrox-secured-cluster-services
  namespace: stackrox
spec:
  clusterName: production-cluster
  centralEndpoint: central.stackrox.svc:443
  admissionControl:
    listenOnUpdates: true
    bypass: BreakGlassAnnotation
    contactImageScanners: ScanIfMissing
    timeoutSeconds: 20

漏洞掃描

ACS 自動掃描所有部署的 Image:

# 查看漏洞報告
roxctl --insecure-skip-tls-verify \
  -e "central.stackrox.svc:443" \
  image scan --image nginx:latest

# 檢查 Image 是否符合策略
roxctl --insecure-skip-tls-verify \
  -e "central.stackrox.svc:443" \
  image check --image nginx:latest

整合 CI/CD Pipeline

# Tekton Task 範例
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
  name: acs-image-check
spec:
  params:
    - name: image
      type: string
  steps:
    - name: image-check
      image: registry.redhat.io/advanced-cluster-security/rhacs-roxctl-rhel8
      script: |
        roxctl image check \
          --insecure-skip-tls-verify \
          -e "$ACS_CENTRAL_ENDPOINT" \
          --image $(params.image)

執行時期防護

偵測容器內的異常行為:

常見偵測規則

  • 容器內執行 shell
  • 修改 /etc/passwd
  • 讀取 /etc/shadow
  • 下載並執行檔案
  • 橫向移動嘗試

自訂策略

# 在 ACS Console 設定
# System Policies → Create Policy

名稱: Block Crypto Mining
類別: Anomalous Activity
嚴重度: Critical
執行: Enforce

條件:
- Process Name contains "xmrig"
- OR Process Name contains "minerd"

回應: Scale to Zero

合規檢查

ACS 內建多種合規標準:

標準適用場景
CIS Kubernetes Benchmark一般安全基準
NIST 800-190美國政府容器指南
PCI DSS金融業
HIPAA醫療業

ACS 安全設定需要考量誤報率與效能影響。預約架構諮詢,讓我們幫你設計安全策略。


身份驗證設定

OAuth 設定

OpenShift 使用 OAuth Server 處理身份驗證。設定檔在 OAuth CR:

apiVersion: config.openshift.io/v1
kind: OAuth
metadata:
  name: cluster
spec:
  identityProviders:
    - name: my-idp
      type: LDAP  # 或 HTPasswd, OIDC, GitHub 等
      mappingMethod: claim
      # ... IDP 特定設定

支援的 Identity Provider

類型說明適用情境
HTPasswd檔案式密碼測試環境、小規模
LDAP目錄服務企業 AD/LDAP
OIDCOpenID ConnectOkta、Azure AD、Keycloak
GitHubGitHub OAuth開發者環境
GitLabGitLab OAuthGitLab 整合環境

LDAP 整合

最常見的企業整合方式:

apiVersion: config.openshift.io/v1
kind: OAuth
metadata:
  name: cluster
spec:
  identityProviders:
    - name: corporate-ldap
      type: LDAP
      mappingMethod: claim
      ldap:
        attributes:
          id:
            - dn
          email:
            - mail
          name:
            - cn
          preferredUsername:
            - uid
        bindDN: "cn=openshift,ou=service,dc=company,dc=com"
        bindPassword:
          name: ldap-secret  # Secret 名稱
        ca:
          name: ldap-ca  # CA 憑證 ConfigMap
        insecure: false
        url: "ldaps://ldap.company.com:636/ou=users,dc=company,dc=com?uid"

建立 LDAP Secret

oc create secret generic ldap-secret \
  --from-literal=bindPassword='your-password' \
  -n openshift-config

建立 CA ConfigMap

oc create configmap ldap-ca \
  --from-file=ca.crt=/path/to/ca.crt \
  -n openshift-config

Active Directory 整合

AD 整合是 LDAP 的特殊案例:

apiVersion: config.openshift.io/v1
kind: OAuth
metadata:
  name: cluster
spec:
  identityProviders:
    - name: active-directory
      type: LDAP
      mappingMethod: claim
      ldap:
        attributes:
          id:
            - sAMAccountName
          email:
            - mail
          name:
            - displayName
          preferredUsername:
            - sAMAccountName
        bindDN: "CN=OpenShift Service,OU=Service Accounts,DC=corp,DC=company,DC=com"
        bindPassword:
          name: ad-bind-password
        ca:
          name: ad-ca
        insecure: false
        url: "ldaps://ad.corp.company.com:636/DC=corp,DC=company,DC=com?sAMAccountName?sub?(objectClass=user)"

OIDC 設定

整合 Keycloak、Okta、Azure AD:

apiVersion: config.openshift.io/v1
kind: OAuth
metadata:
  name: cluster
spec:
  identityProviders:
    - name: keycloak
      type: OpenID
      mappingMethod: claim
      openID:
        clientID: openshift
        clientSecret:
          name: keycloak-client-secret
        claims:
          preferredUsername:
            - preferred_username
          name:
            - name
          email:
            - email
          groups:
            - groups
        issuer: https://keycloak.company.com/realms/openshift
        ca:
          name: keycloak-ca

HTPasswd 設定

適合測試環境或小規模部署:

# 建立 htpasswd 檔案
htpasswd -c -B -b users.htpasswd admin password123
htpasswd -B -b users.htpasswd developer dev123

# 建立 Secret
oc create secret generic htpass-secret \
  --from-file=htpasswd=users.htpasswd \
  -n openshift-config
apiVersion: config.openshift.io/v1
kind: OAuth
metadata:
  name: cluster
spec:
  identityProviders:
    - name: htpasswd
      type: HTPasswd
      mappingMethod: claim
      htpasswd:
        fileData:
          name: htpass-secret

RBAC 進階設定

ClusterRole 設計

內建 ClusterRole

Role權限
cluster-admin完整叢集權限
admin專案內完整權限
edit專案內讀寫(不含 RBAC)
view專案內唯讀

自訂 ClusterRole

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: namespace-admin
rules:
  - apiGroups: [""]
    resources: ["namespaces"]
    verbs: ["get", "list", "watch", "create", "delete"]
  - apiGroups: [""]
    resources: ["resourcequotas", "limitranges"]
    verbs: ["*"]
  - apiGroups: ["project.openshift.io"]
    resources: ["projects"]
    verbs: ["get", "list", "watch"]

專案權限管理

指派專案管理員

# 讓 john 成為 my-project 的管理員
oc adm policy add-role-to-user admin john -n my-project

# 讓 dev-team 群組有 edit 權限
oc adm policy add-role-to-group edit dev-team -n my-project

RoleBinding 範例

apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: admin-binding
  namespace: my-project
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: admin
subjects:
  - apiGroup: rbac.authorization.k8s.io
    kind: User
    name: john
  - apiGroup: rbac.authorization.k8s.io
    kind: Group
    name: dev-team

群組同步

自動同步 LDAP 群組:

# ldap-sync-config.yaml
kind: LDAPSyncConfig
apiVersion: v1
url: ldaps://ldap.company.com:636
bindDN: cn=openshift,ou=service,dc=company,dc=com
bindPassword:
  file: /etc/secrets/bindPassword
insecure: false
ca: /etc/ldap-ca/ca.crt
augmentedActiveDirectory:
  groupsQuery:
    baseDN: "ou=groups,dc=company,dc=com"
    scope: sub
    derefAliases: never
    filter: (objectClass=group)
  groupUIDAttribute: dn
  groupNameAttributes:
    - cn
  usersQuery:
    baseDN: "ou=users,dc=company,dc=com"
    scope: sub
    derefAliases: never
  userNameAttributes:
    - sAMAccountName
  groupMembershipAttributes:
    - memberOf

執行群組同步

# 預覽同步結果
oc adm groups sync --sync-config=ldap-sync-config.yaml

# 實際執行同步
oc adm groups sync --sync-config=ldap-sync-config.yaml --confirm

# 設定定期同步(CronJob)

最小權限原則

Service Account 權限限制

# 只允許讀取 ConfigMap 的 ServiceAccount
apiVersion: v1
kind: ServiceAccount
metadata:
  name: config-reader
  namespace: my-app
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: configmap-reader
  namespace: my-app
rules:
  - apiGroups: [""]
    resources: ["configmaps"]
    verbs: ["get", "list", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: config-reader-binding
  namespace: my-app
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: configmap-reader
subjects:
  - kind: ServiceAccount
    name: config-reader
    namespace: my-app

插圖:展示 OpenShift RBAC 權限階層。從上到下分為 ...

場景描述: 展示 OpenShift RBAC 權限階層。從上到下分為 ClusterRole(cluster-admin)→ ClusterRoleBinding → User/Group/ServiceAccount。旁邊另一條線顯示 Role(namespace 範圍)→ RoleBinding → Subject。標註各層的影響範圍。

視覺重點:

  • 主要內容清晰呈現

必須出現的元素:

  • 依據描述

需要顯示的中文字:

顏色調性: 專業、清晰

避免元素: 抽象圖形、齒輪

Slug: openshift-rbac-hierarchy


Auto Scaling 設定

Horizontal Pod Autoscaler(HPA)

根據 CPU/Memory 使用率自動調整 Pod 數量:

apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
  name: my-app-hpa
  namespace: my-app
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: my-app
  minReplicas: 2
  maxReplicas: 10
  metrics:
    - type: Resource
      resource:
        name: cpu
        target:
          type: Utilization
          averageUtilization: 70
    - type: Resource
      resource:
        name: memory
        target:
          type: Utilization
          averageUtilization: 80
  behavior:
    scaleDown:
      stabilizationWindowSeconds: 300  # 5 分鐘穩定期
      policies:
        - type: Percent
          value: 10
          periodSeconds: 60
    scaleUp:
      stabilizationWindowSeconds: 0
      policies:
        - type: Percent
          value: 100
          periodSeconds: 15

Vertical Pod Autoscaler(VPA)

自動調整 Pod 的 CPU/Memory requests:

apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
  name: my-app-vpa
  namespace: my-app
spec:
  targetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: my-app
  updatePolicy:
    updateMode: Auto  # Off, Initial, Recreate, Auto
  resourcePolicy:
    containerPolicies:
      - containerName: '*'
        minAllowed:
          cpu: 100m
          memory: 128Mi
        maxAllowed:
          cpu: 4
          memory: 8Gi
        controlledResources:
          - cpu
          - memory

VPA 模式

模式說明
Off只提供建議,不自動調整
Initial只在 Pod 建立時設定,不會更新現有 Pod
Recreate刪除並重建 Pod 來套用新設定
Auto自動選擇最佳方式

Cluster Autoscaler

自動增減節點數量:

apiVersion: "autoscaling.openshift.io/v1"
kind: "ClusterAutoscaler"
metadata:
  name: "default"
spec:
  podPriorityThreshold: -10
  resourceLimits:
    maxNodesTotal: 100
    cores:
      min: 8
      max: 400
    memory:
      min: 16
      max: 1600
  logVerbosity: 4
  scaleDown:
    enabled: true
    delayAfterAdd: 10m
    delayAfterDelete: 5m
    delayAfterFailure: 3m
    unneededTime: 5m
    utilizationThreshold: "0.4"

Machine Autoscaler

配合 MachineSet 設定:

apiVersion: "autoscaling.openshift.io/v1beta1"
kind: "MachineAutoscaler"
metadata:
  name: "worker-us-east-1a"
  namespace: "openshift-machine-api"
spec:
  minReplicas: 1
  maxReplicas: 10
  scaleTargetRef:
    apiVersion: machine.openshift.io/v1beta1
    kind: MachineSet
    name: cluster-name-worker-us-east-1a

完整 Auto Scaling 架構

                    ┌─────────────────────────┐
                    │   Cluster Autoscaler    │
                    │ (管理整體節點數量限制)    │
                    └───────────┬─────────────┘
                                │
         ┌──────────────────────┼──────────────────────┐
         ▼                      ▼                      ▼
┌─────────────────┐   ┌─────────────────┐   ┌─────────────────┐
│ Machine          │   │ Machine          │   │ Machine          │
│ Autoscaler       │   │ Autoscaler       │   │ Autoscaler       │
│ (Zone A)         │   │ (Zone B)         │   │ (Zone C)         │
└────────┬────────┘   └────────┬────────┘   └────────┬────────┘
         │                     │                     │
         ▼                     ▼                     ▼
┌─────────────────┐   ┌─────────────────┐   ┌─────────────────┐
│ MachineSet       │   │ MachineSet       │   │ MachineSet       │
│ (worker-a)       │   │ (worker-b)       │   │ (worker-c)       │
└─────────────────┘   └─────────────────┘   └─────────────────┘

API Gateway(3scale)

3scale 是什麼

Red Hat 3scale API Management 是企業級 API Gateway。提供 API 管理、流量控制、開發者入口。

3scale 核心元件

元件功能
APIcastAPI Gateway,處理流量
Backend授權和速率限制邏輯
System管理介面和設定
Developer Portal開發者自助服務入口

安裝 3scale

# 安裝 3scale Operator
cat <<EOF | oc apply -f -
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: 3scale-operator
  namespace: openshift-operators
spec:
  channel: threescale-2.14
  installPlanApproval: Automatic
  name: 3scale-operator
  source: redhat-operators
  sourceNamespace: openshift-marketplace
EOF

部署 APIManager

apiVersion: apps.3scale.net/v1alpha1
kind: APIManager
metadata:
  name: apimanager
  namespace: 3scale
spec:
  wildcardDomain: apps.cluster.example.com
  resourceRequirementsEnabled: true
  system:
    fileStorage:
      persistentVolumeClaim:
        storageClassName: gp2

API 管理

建立 API Product

  1. 進入 3scale Admin Portal
  2. Products → Create Product
  3. 設定 Backend 指向實際服務
  4. 設定 Application Plans(定價方案)
  5. 發布 API

流量控制設定

# Application Plan 設定
- 速率限制:1000 requests/hour
- 配額:10000 requests/month
- 計價:$0.01/request(超過配額)

開發者入口

3scale 提供自助服務的 Developer Portal:

  • API 文件(自動生成)
  • API Key 申請
  • 用量儀表板
  • 計費資訊

服務網格

OpenShift Service Mesh

OpenShift Service Mesh 基於 Istio,提供服務間通訊的管理:

核心功能

  • 流量管理:路由、負載平衡、金絲雀部署
  • 安全性:mTLS、授權策略
  • 可觀測性:分散式追蹤、指標收集

安裝 Service Mesh

步驟 1:安裝依賴 Operator

# 依序安裝
# 1. OpenShift Elasticsearch Operator
# 2. Red Hat OpenShift distributed tracing platform(Jaeger)
# 3. Kiali Operator
# 4. Red Hat OpenShift Service Mesh Operator

步驟 2:建立 ServiceMeshControlPlane

apiVersion: maistra.io/v2
kind: ServiceMeshControlPlane
metadata:
  name: basic
  namespace: istio-system
spec:
  version: v2.5
  tracing:
    type: Jaeger
    sampling: 10000  # 100%
  addons:
    kiali:
      enabled: true
    grafana:
      enabled: true
    jaeger:
      install:
        storage:
          type: Memory

步驟 3:建立 ServiceMeshMemberRoll

apiVersion: maistra.io/v1
kind: ServiceMeshMemberRoll
metadata:
  name: default
  namespace: istio-system
spec:
  members:
    - my-app-namespace
    - another-namespace

流量管理

VirtualService 路由設定

apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
  name: reviews-route
  namespace: my-app
spec:
  hosts:
    - reviews
  http:
    - match:
        - headers:
            end-user:
              exact: jason
      route:
        - destination:
            host: reviews
            subset: v2
    - route:
        - destination:
            host: reviews
            subset: v1
          weight: 90
        - destination:
            host: reviews
            subset: v2
          weight: 10

DestinationRule 負載平衡

apiVersion: networking.istio.io/v1beta1
kind: DestinationRule
metadata:
  name: reviews-destination
  namespace: my-app
spec:
  host: reviews
  trafficPolicy:
    connectionPool:
      tcp:
        maxConnections: 100
      http:
        http1MaxPendingRequests: 100
        http2MaxRequests: 1000
    loadBalancer:
      simple: ROUND_ROBIN
  subsets:
    - name: v1
      labels:
        version: v1
    - name: v2
      labels:
        version: v2

可觀測性

Kiali:服務拓撲視覺化 Jaeger:分散式追蹤 Grafana:指標儀表板

# 取得 Kiali URL
oc get route kiali -n istio-system

# 取得 Jaeger URL
oc get route jaeger -n istio-system

常見問題 FAQ

Q1:ACM 和 ACS 可以一起用嗎?

可以,而且建議一起用。ACM 負責多叢集管理,ACS 負責安全。ACM 可以統一部署 ACS 的 SecuredCluster 到所有 Managed Cluster,形成統一的安全監控。在 Hub Cluster 安裝 ACS Central,然後透過 ACM Policy 部署 SecuredCluster 到所有叢集。

Q2:LDAP 整合失敗怎麼排查?

常見問題:(1)網路連不到 LDAP Server,檢查防火牆;(2)bindDN 或密碼錯誤;(3)CA 憑證問題(LDAPS);(4)搜尋 filter 語法錯誤。排查指令:oc logs -n openshift-authentication deployment/oauth-openshift。也可以用 ldapsearch 測試連線。

Q3:HPA 和 VPA 可以同時用嗎?

可以,但要小心。建議 VPA 只管 memory,HPA 管 CPU。或者 VPA 用 Off 模式只提供建議,實際調整由 HPA 處理。同時用在同一個資源(如 CPU)可能造成衝突。

Q4:Service Mesh 會影響效能嗎?

會有一些影響。Sidecar Proxy(Envoy)增加的延遲通常在 1-3ms。對大多數應用可接受,但對超低延遲需求的應用要評估。可以用 istio-proxy 的 concurrency 設定調整效能。也可以選擇性地把關鍵路徑排除在 mesh 外。

Q5:3scale 和 Service Mesh 怎麼選?

不同定位:3scale 是 API Management,處理南北向流量(外部到內部),提供 API 計費、開發者入口等功能。Service Mesh 處理東西向流量(服務之間),提供 mTLS、可觀測性。很多企業兩者都用:3scale 在邊界,Service Mesh 在內部。


進階功能是企業級部署的關鍵

多叢集管理和進階安全能讓 OpenShift 發揮最大價值,但設定複雜度也高。

預約架構諮詢,讓我們幫你規劃完整的企業架構。


參考資源

需要專業的雲端建議?

無論您正在評估雲平台、優化現有架構,或尋找節費方案,我們都能提供協助

預約免費諮詢

相關文章