8장.


중요

8.1.

주의

  1. $ openstack flavor create --<ram 16384> --<disk 0> --ephemeral 10 --vcpus 4 <flavor_name>
    Copy to Clipboard Toggle word wrap
  2. # ...
    controlPlane:
      name: master
      platform:
        openstack:
          type: ${CONTROL_PLANE_FLAVOR}
          rootVolume:
            size: 25
            types:
            - ${CINDER_TYPE}
      replicas: 3
    # ...
    Copy to Clipboard Toggle word wrap

  3. $ openshift-install create cluster --dir <installation_directory> 
    1
    Copy to Clipboard Toggle word wrap
    1
  4. $ oc wait clusteroperators --all --for=condition=Progressing=false 
    1
    Copy to Clipboard Toggle word wrap
    1
  5. $ oc patch ControlPlaneMachineSet/cluster -n openshift-machine-api --type json -p ' 
    1
    
    [
        {
          "op": "add",
          "path": "/spec/template/machines_v1beta1_machine_openshift_io/spec/providerSpec/value/additionalBlockDevices", 
    2
    
          "value": [
            {
              "name": "etcd",
              "sizeGiB": 10,
              "storage": {
                "type": "Local" 
    3
    
              }
            }
          ]
        }
      ]
    '
    Copy to Clipboard Toggle word wrap
    1
    2
    3
    1. $ oc wait --timeout=90m --for=condition=Progressing=false controlplanemachineset.machine.openshift.io -n openshift-machine-api cluster
      Copy to Clipboard Toggle word wrap
    2. $ oc wait --timeout=90m --for=jsonpath='{.status.updatedReplicas}'=3 controlplanemachineset.machine.openshift.io -n openshift-machine-api cluster
      Copy to Clipboard Toggle word wrap
    3. $ oc wait --timeout=90m --for=jsonpath='{.status.replicas}'=3 controlplanemachineset.machine.openshift.io -n openshift-machine-api cluster
      Copy to Clipboard Toggle word wrap
    4. $ oc wait clusteroperators --timeout=30m --all --for=condition=Progressing=false
      Copy to Clipboard Toggle word wrap
    $ cp_machines=$(oc get machines -n openshift-machine-api --selector='machine.openshift.io/cluster-api-machine-role=master' --no-headers -o custom-columns=NAME:.metadata.name) 
    1
    
    
    
    if [[ $(echo "${cp_machines}" | wc -l) -ne 3 ]]; then
      exit 1
    fi 
    2
    
    
    
    for machine in ${cp_machines}; do
      if ! oc get machine -n openshift-machine-api "${machine}" -o jsonpath='{.spec.providerSpec.value.additionalBlockDevices}' | grep -q 'etcd'; then
    	exit 1
      fi 
    3
    
    done
    Copy to Clipboard Toggle word wrap
    1
    2
    3
  6. 주의

    apiVersion: machineconfiguration.openshift.io/v1
    kind: MachineConfig
    metadata:
      labels:
        machineconfiguration.openshift.io/role: master
      name: 98-var-lib-etcd
    spec:
      config:
        ignition:
          version: 3.4.0
        systemd:
          units:
          - contents: |
              [Unit]
              Description=Mount local-etcd to /var/lib/etcd
    
              [Mount]
              What=/dev/disk/by-label/local-etcd 
    1
    
              Where=/var/lib/etcd
              Type=xfs
              Options=defaults,prjquota
    
              [Install]
              WantedBy=local-fs.target
            enabled: true
            name: var-lib-etcd.mount
          - contents: |
              [Unit]
              Description=Create local-etcd filesystem
              DefaultDependencies=no
              After=local-fs-pre.target
              ConditionPathIsSymbolicLink=!/dev/disk/by-label/local-etcd 
    2
    
    
              [Service]
              Type=oneshot
              RemainAfterExit=yes
              ExecStart=/bin/bash -c "[ -L /dev/disk/by-label/ephemeral0 ] || ( >&2 echo Ephemeral disk does not exist; /usr/bin/false )"
              ExecStart=/usr/sbin/mkfs.xfs -f -L local-etcd /dev/disk/by-label/ephemeral0 
    3
    
    
              [Install]
              RequiredBy=dev-disk-by\x2dlabel-local\x2detcd.device
            enabled: true
            name: create-local-etcd.service
          - contents: |
              [Unit]
              Description=Migrate existing data to local etcd
              After=var-lib-etcd.mount
              Before=crio.service 
    4
    
    
              Requisite=var-lib-etcd.mount
              ConditionPathExists=!/var/lib/etcd/member
              ConditionPathIsDirectory=/sysroot/ostree/deploy/rhcos/var/lib/etcd/member 
    5
    
    
              [Service]
              Type=oneshot
              RemainAfterExit=yes
    
              ExecStart=/bin/bash -c "if [ -d /var/lib/etcd/member.migrate ]; then rm -rf /var/lib/etcd/member.migrate; fi" 
    6
    
    
              ExecStart=/usr/bin/cp -aZ /sysroot/ostree/deploy/rhcos/var/lib/etcd/member/ /var/lib/etcd/member.migrate
              ExecStart=/usr/bin/mv /var/lib/etcd/member.migrate /var/lib/etcd/member 
    7
    
    
              [Install]
              RequiredBy=var-lib-etcd.mount
            enabled: true
            name: migrate-to-local-etcd.service
          - contents: |
              [Unit]
              Description=Relabel /var/lib/etcd
    
              After=migrate-to-local-etcd.service
              Before=crio.service
    
              [Service]
              Type=oneshot
              RemainAfterExit=yes
    
              ExecCondition=/bin/bash -c "[ -n \"$(restorecon -nv /var/lib/etcd)\" ]" 
    8
    
    
              ExecStart=/usr/sbin/restorecon -R /var/lib/etcd
    
              [Install]
              RequiredBy=var-lib-etcd.mount
            enabled: true
            name: relabel-var-lib-etcd.service
    Copy to Clipboard Toggle word wrap
    1
    2
    3
    4
    5
    6
    7
    8
  7. $ oc create -f 98-var-lib-etcd.yaml
    Copy to Clipboard Toggle word wrap
    참고

    1. $ oc wait --timeout=45m --for=condition=Updating=false machineconfigpool/master
      Copy to Clipboard Toggle word wrap
    2. $ oc wait node --selector='node-role.kubernetes.io/master' --for condition=Ready --timeout=30s
      Copy to Clipboard Toggle word wrap
    3. $ oc wait clusteroperators --timeout=30m --all --for=condition=Progressing=false
      Copy to Clipboard Toggle word wrap
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

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

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

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

Red Hat 소개

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

Theme

© 2025 Red Hat