9장.


9.1.

  1. clusterinstance/
    ├── site1-sno-du.yaml
    ├── extra-manifest/
    │   ├── 01-example-machine-config.yaml
    │   ├── enable-crun-master.yaml
    │   └── enable-crun-worker.yaml
    └── kustomization.yaml
  2. apiVersion: kustomize.config.k8s.io/v1beta1
    kind: Kustomization
    resources:
      - site1-sno-du.yaml
    configMapGenerator:
      - name: extra-manifests-cm
        namespace: site1-sno-du
        files:
          - extra-manifest/01-example-machine-config.yaml
          - extra-manifest/enable-crun-master.yaml
          - extra-manifest/enable-crun-worker.yaml
    generatorOptions:
      disableNameSuffixHash: true
  3. apiVersion: siteconfig.open-cluster-management.io/v1alpha1
    kind: ClusterInstance
    metadata:
      name: "site1-sno-du"
      namespace: "site1-sno-du"
    spec:
      clusterName: "site1-sno-du"
      networkType: "OVNKubernetes"
      extraManifestsRefs:
        - name: extra-manifests-cm
      # ...
  4. 참고

9.2.

참고

  1. apiVersion: kustomize.config.k8s.io/v1beta1
    kind: Kustomization
    resources:
      - site1-sno-du.yaml
    configMapGenerator:
      - name: br-ex-extra-manifest
        namespace: site1-sno-du
        files:
          - extra-manifest/10-br-ex-master.yaml
    generatorOptions:
      disableNameSuffixHash: true
  2. apiVersion: siteconfig.open-cluster-management.io/v1alpha1
    kind: ClusterInstance
    metadata:
      name: "site1-sno-du"
      namespace: "site1-sno-du"
    spec:
      clusterName: "site1-sno-du"
      networkType: "OVNKubernetes"
      extraManifestsRefs:
        - name: br-ex-extra-manifest
      # ...

  • $ oc get configmap br-ex-extra-manifest -n site1-sno-du
  • $ oc get machineconfig 10-br-ex-master

9.3.

중요

  1. apiVersion: siteconfig.open-cluster-management.io/v1alpha1
    kind: ClusterInstance
    metadata:
      name: "site1-sno-du"
      namespace: "site1-sno-du"
    spec:
      nodes:
        - hostName: "node1.example.com"
          nodeNetwork:
            interfaces:
              - name: "bond0.120"
                macAddress: "00:00:00:00:00:00"
            config:
              interfaces:
                - name: bond0.120
                  type: vlan
                  state: up
                  mtu: 9100
                  ipv4:
                    enabled: true
                    dhcp: false
                    address:
                      - ip: "192.168.120.15"
                        prefix-length: 25
                  vlan:
                    base-iface: bond0
                    id: 120
      # ...
  2. apiVersion: operator.openshift.io/v1
    kind: Network
    metadata:
      name: cluster
    spec:
      defaultNetwork:
        ovnKubernetesConfig:
          mtu: 8900

  3. clusterinstance/
    ├── site1-sno-du.yaml
    ├── extra-manifest/
    │   └── set-cluster-mtu.yaml
    └── kustomization.yaml
  4. apiVersion: kustomize.config.k8s.io/v1beta1
    kind: Kustomization
    resources:
      - site1-sno-du.yaml
    configMapGenerator:
      - name: cluster-mtu-extra-manifests
        namespace: site1-sno-du
        files:
          - extra-manifest/set-cluster-mtu.yaml
    generatorOptions:
      disableNameSuffixHash: true
  5. apiVersion: siteconfig.open-cluster-management.io/v1alpha1
    kind: ClusterInstance
    metadata:
      name: "site1-sno-du"
      namespace: "site1-sno-du"
    spec:
      clusterName: "site1-sno-du"
      networkType: "OVNKubernetes"
      extraManifestsRefs:
        - name: cluster-mtu-extra-manifests
      # ...

  • $ oc get networks.operator.openshift.io cluster -o yaml

    apiVersion: operator.openshift.io/v1
    kind: Network
    metadata:
      name: cluster
    # ...
    spec:
      # ...
      defaultNetwork:
        ovnKubernetesConfig:
          # ...
          mtu: 8900

9.4.

  1. apiVersion: siteconfig.open-cluster-management.io/v1alpha1
    kind: ClusterInstance
    metadata:
      name: "example-cluster"
      namespace: "example-cluster"
    spec:
      # ...
      nodes:
        - hostName: "worker-node2.example.com"
          role: "worker"
          extraAnnotations:
            BareMetalHost:
              bmac.agent-install.openshift.io/remove-agent-and-node-on-delete: "true"
    # ...
  2. $ oc get bmh -n <cluster_namespace> <bmh_name> -ojsonpath='{.metadata}' | jq -r '.annotations["bmac.agent-install.openshift.io/remove-agent-and-node-on-delete"]'

    true

  3. apiVersion: siteconfig.open-cluster-management.io/v1alpha1
    kind: ClusterInstance
    metadata:
      name: "example-cluster"
      namespace: "example-cluster"
    spec:
      # ...
      nodes:
        - hostName: "worker-node2.example.com"
          role: "worker"
          pruneManifests:
            - apiVersion: metal3.io/v1alpha1
              kind: BareMetalHost
    # ...

  1. $ oc get bmh -n <cluster_namespace>
    $ oc get agent -n <cluster_namespace>
  2. $ oc get nodes
    참고

9.5.

주의

  1. $ oc --kubeconfig <managed_cluster_kubeconfig> get nodes

    NAME                           STATUS     ROLES                  AGE   VERSION
    control-plane-0.example.com    Ready      control-plane,master   10d   v1.33.0
    control-plane-1.example.com    Ready      control-plane,master   10d   v1.33.0
    control-plane-2.example.com    NotReady   control-plane,master   10d   v1.33.0
    compute-1.example.com          Ready      worker                 10d   v1.33.0

  2. apiVersion: siteconfig.open-cluster-management.io/v1alpha1
    kind: ClusterInstance
    metadata:
      name: "example-cluster"
      namespace: "example-cluster"
    spec:
      # ...
      nodes:
        - hostName: "control-plane-2.example.com"
          role: "master"
          extraAnnotations:
            BareMetalHost:
              bmac.agent-install.openshift.io/remove-agent-and-node-on-delete: "true"
    # ...
  3. $ oc --kubeconfig <hub_cluster_kubeconfig> get bmh -n <cluster_namespace> <bmh_name> \
      -o jsonpath='{.metadata.annotations.bmac\.agent-install\.openshift.io/remove-agent-and-node-on-delete}{"\n"}'

    true

  4. apiVersion: siteconfig.open-cluster-management.io/v1alpha1
    kind: ClusterInstance
    metadata:
      name: "example-cluster"
      namespace: "example-cluster"
    spec:
      # ...
      nodes:
        - hostName: "control-plane-2.example.com"
          role: "master"
          extraAnnotations:
            BareMetalHost:
              bmac.agent-install.openshift.io/remove-agent-and-node-on-delete: "true"
          pruneManifests:
            - apiVersion: metal3.io/v1alpha1
              kind: BareMetalHost
    # ...

  5. $ oc --kubeconfig <hub_cluster_kubeconfig> get bmh -n <cluster_namespace>

  6. $ oc --kubeconfig <hub_cluster_kubeconfig> get agent -n <cluster_namespace> \
      -o jsonpath='{range .items[*]}{.spec.hostname}{"\n"}{end}' | grep <failed_hostname>

    중요

  7. $ oc --kubeconfig <managed_cluster_kubeconfig> get nodes
    • apiVersion: siteconfig.open-cluster-management.io/v1alpha1
      kind: ClusterInstance
      metadata:
        name: "example-cluster"
        namespace: "example-cluster"
      spec:
        # ...
        nodes:
          - hostName: "control-plane-2.example.com"
            role: "master"
            bmcAddress: "redfish-virtualmedia+https://192.0.2.22/redfish/v1/Systems/System.Embedded.1"
            bmcCredentialsName:
              name: "control-plane-2-bmc-secret"
            bootMACAddress: "AA:BB:CC:DD:EE:22"
            bootMode: "UEFI"
            nodeNetwork:
              interfaces:
                - name: eno1
                  macAddress: "AA:BB:CC:DD:EE:22"
              config:
                interfaces:
                  - name: eno1
                    type: ethernet
                    state: up
                    macAddress: "AA:BB:CC:DD:EE:22"
                    ipv4:
                      enabled: true
                      address:
                        - ip: 192.0.2.12
                          prefix-length: 24
                    ipv6:
                      enabled: false
      # ...
  8. apiVersion: v1
    kind: Secret
    metadata:
      name: "control-plane-2-bmc-secret"
      namespace: example-cluster
    stringData:
      username: "username"
      password: "password"
    type: Opaque
  9. $ oc --kubeconfig <hub_cluster_kubeconfig> get bmh -n <cluster_namespace>

    NAME                           STATE          CONSUMER   ONLINE   ERROR   AGE
    control-plane-0.example.com    provisioned               true             10d
    control-plane-1.example.com    provisioned               true             10d
    control-plane-2.example.com    provisioning              true             5m

  1. $ oc --kubeconfig <managed_cluster_kubeconfig> get nodes -l node-role.kubernetes.io/control-plane

  2. $ oc --kubeconfig <managed_cluster_kubeconfig> get pods -n openshift-etcd
  3. $ oc --kubeconfig <managed_cluster_kubeconfig> rsh -n openshift-etcd <etcd_pod> \
      etcdctl member list -w table

  4. $ oc --kubeconfig <managed_cluster_kubeconfig> rsh -n openshift-etcd <etcd_pod> \
      etcdctl endpoint health --cluster
  5. $ oc --kubeconfig <managed_cluster_kubeconfig> get clusteroperators etcd kube-apiserver

Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동