1.8.


  • 주의

    ## Snippet to remove unauthenticated group from all the cluster role bindings
    $ for clusterrolebinding in cluster-status-binding discovery system:basic-user system:discovery system:openshift:discovery ;
    do
    ### Find the index of unauthenticated group in list of subjects
    index=$(oc get clusterrolebinding ${clusterrolebinding} -o json | jq 'select(.subjects!=null) | .subjects | map(.name=="system:unauthenticated") | index(true)');
    ### Remove the element at index from subjects array
    oc patch clusterrolebinding ${clusterrolebinding} --type=json --patch "[{'op': 'remove','path': '/subjects/$index'}]";
    done
    Copy to Clipboard Toggle word wrap

      1. $ oc get infrastructure/cluster -ojson | jq -r '.status.infrastructureName'
        Copy to Clipboard Toggle word wrap
      2. $ ibmcloud is lb <cluster_ID>-kubernetes-api-private  --output json | jq -r '.provisioning_status'
        Copy to Clipboard Toggle word wrap
    1. $ oc get machine -n openshift-machine-api
      Copy to Clipboard Toggle word wrap

      NAME                                    PHASE         TYPE       REGION    ZONE        AGE
      example-public-1-x4gpn-master-0         Running       bx2-4x16   us-east   us-east-1   23h
      example-public-1-x4gpn-master-1         Running       bx2-4x16   us-east   us-east-2   23h
      example-public-1-x4gpn-master-2         Running       bx2-4x16   us-east   us-east-3   23h
      example-public-1-x4gpn-worker-1-xqzzm   Running       bx2-4x16   us-east   us-east-1   22h
      example-public-1-x4gpn-worker-2-vg9w6   Provisioned   bx2-4x16   us-east   us-east-2   22h
      example-public-1-x4gpn-worker-3-2f7zd   Provisioned   bx2-4x16   us-east   us-east-3   22h
      Copy to Clipboard Toggle word wrap

    2. $ oc delete machine <name_of_machine> -n openshift-machine-api
      Copy to Clipboard Toggle word wrap
    3. $ oc get machine -n openshift-machine-api
      Copy to Clipboard Toggle word wrap

      NAME                                    PHASE     TYPE       REGION    ZONE        AGE
      example-public-1-x4gpn-master-0         Running   bx2-4x16   us-east   us-east-1   23h
      example-public-1-x4gpn-master-1         Running   bx2-4x16   us-east   us-east-2   23h
      example-public-1-x4gpn-master-2         Running   bx2-4x16   us-east   us-east-3   23h
      example-public-1-x4gpn-worker-1-xqzzm   Running   bx2-4x16   us-east   us-east-1   23h
      example-public-1-x4gpn-worker-2-mnlsz   Running   bx2-4x16   us-east   us-east-2   8m2s
      example-public-1-x4gpn-worker-3-7nz4q   Running   bx2-4x16   us-east   us-east-3   7m24s
      Copy to Clipboard Toggle word wrap

    4. $ ./openshift-install wait-for install-complete
      Copy to Clipboard Toggle word wrap

  • metadata:
      name: redhat-operators-disconnected
    spec:
      displayName: disconnected-redhat-operators
      image: registry.example.com:5000/disconnected-redhat-operators/disconnected-redhat-operator-index:v4.11
    status:
      connectionState:
        lastObservedState: READY
    Copy to Clipboard Toggle word wrap

  • metadata.annotations.upgrade: "1"
    Copy to Clipboard Toggle word wrap

  • curl -X POST -i --insecure -u "<BMC_username>:<BMC_password>" https://<BMC_IP>/redfish/v1/EventService/Subscriptions \
        -H 'Content-Type: application/json' \
        --data-raw '{
        "Protocol": "Redfish",
        "Context": "any string is valid",
        "Destination": "https://hw-event-proxy-openshift-bare-metal-events.apps.example.com/webhook",
        "EventTypes": ["Alert"]
        }'
    Copy to Clipboard Toggle word wrap

    $ oc delete pods --all -n openshift-cloud-controller-manager
    Copy to Clipboard Toggle word wrap

      1. $ cd ~/clusterconfigs/openshift
        $ vim openshift-worker-0.yaml
        Copy to Clipboard Toggle word wrap
        apiVersion: metal3.io/v1alpha1
        kind: BareMetalHost
        metadata:
          annotations:
            bmac.agent-install.openshift.io/installer-args: '["--append-karg", "ip=<static_ip>::<gateway>:<netmask>:<hostname_1>:<interface>:none", "--save-partindex", "1", "-n"]' 
        1
         
        2
         
        3
         
        4
         
        5
        
            inspect.metal3.io: disabled
            bmac.agent-install.openshift.io/hostname: <fqdn> 
        6
        
            bmac.agent-install.openshift.io/role: <role> 
        7
        
          generation: 1
          name: openshift-worker-0
          namespace: mynamespace
        spec:
          automatedCleaningMode: disabled
          bmc:
            address: idrac-virtualmedia://<bmc_ip>/redfish/v1/Systems/System.Embedded.1 
        8
        
            credentialsName: bmc-secret-openshift-worker-0
            disableCertificateVerification: true
          bootMACAddress: 94:6D:AE:AB:EE:E8
          bootMode: "UEFI"
          rootDeviceHints:
            deviceName: /dev/sda
        Copy to Clipboard Toggle word wrap

        1
        2
        3
        4
        5
        6
        7
        8
    1. $ curl https://api.openshift.com/api/assisted-install/v2/infra-envs/${infra_env_id}/hosts/${host_id}/installer-args \
      -X PATCH \
      -H "Authorization: Bearer ${API_TOKEN}" \
      -H "Content-Type: application/json" \
      -d '
          {
            "args": [
              "--append-karg",
              "ip=<static_ip>::<gateway>:<netmask>:<hostname_1>:<interface>:none", 
      1
       
      2
       
      3
       
      4
       
      5
      
              "--save-partindex",
              "1",
              "-n"
            ]
          }
        ' | jq
      Copy to Clipboard Toggle word wrap

      1
      2
      3
      4
      5

맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

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

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

Red Hat 소개

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

Theme

© 2025 Red Hat