OSD pod의 memory request값과 limit값을 설정하는 방법
request: pod생성시 메모리 최소 필요량
limit: 메모리가 해당 값 도달시 pod 재시작
cluster.yaml 수정
[manager@master:rook/deploy/examples]$ vi cluster.yaml
osd:
limits:
cpu: "1000m"
memory: "3Gi"
requests:
cpu: "500m"
memory: "1025Mi"
MGR의 Deployments 자체를 2개 생성하는 방법이므로
Replicaset의 replica factor를 2로 설정하는 방법과 비교 테스트 후 운영 서버 적용 필요
cluster.yaml 수정
[manager@master:rook/deploy/examples]$ vi cluster.yaml
mgr:
# When higher availability of the mgr is needed, increase the count to 2.
# In that case, one mgr will be active and one in standby. When Ceph updates which
# mgr is active, Rook will update the mgr services to match the active mgr.
count: 2
자동으로 사용가능한 Disk를 OSD로 생성해주는 방법 대신
OSD로 사용할 Disk를 직접 지정하는 방식
cluster.yaml 수정
[manager@master:rook/deploy/examples]$ vi cluster.yaml
storage: # cluster level storage configuration and selection
#useAllNodes 및 useAllDevices값을 false로 수정한다.
useAllNodes: false
useAllDevices: false
#deviceFilter:
config:
# crushRoot: "custom-root" # specify a non-default root label for the CRUSH map
# metadataDevice: "md0" # specify a non-rotational storage so ceph-volume will use it as block db device of bluestore.
# databaseSizeMB: "1024" # uncomment if the disks are smaller than 100 GB
# journalSizeMB: "1024" # uncomment if the disks are 20 GB or smaller
# osdsPerDevice: "1" # this value can be overridden at the node or device level
# encryptedDevice: "true" # the default value for this option is "false"
Individual nodes and their config can be specified as well, but 'useAllNodes' above must be set to false. Then, only the named
nodes below will be used as storage resources. Each node's 'name' field should match their 'kubernetes.io/hostname' label.
# 아래에 지정할 node 및 device명을 입력한다.
nodes:
- name: "k8s02"
devices:
- name: "xvdb"
- name: "xvdc"
- name: "k8s03"
devices:
- name: "xvdb"
- name: "xvdc"
- name: "xvde"
- name: "xvdf"
- name: "xvdg"
- name: "k8s04"
devices:
- name: "xvdb"
- name: "xvdc"
RGW Pod의 부하 분산을 위한 Replication 설정
[root@k8s01 object-store-01]# vi object.yaml
apiVersion: ceph.rook.io/v1
kind: CephObjectStore
metadata:
name: object-store-01
namespace: rook-ceph # namespace:cluster
spec:
# The pool spec used to create the metadata pools. Must use replication.
metadataPool:
failureDomain: host
replicated:
size: 3
# Disallow setting pool with replica 1, this could lead to data loss without recovery.
# Make sure you're *ABSOLUTELY CERTAIN* that is what you want
requireSafeReplicaSize: true
parameters:
# Inline compression mode for the data pool
# Further reference: https://docs.ceph.com/docs/master/rados/configuration/bluestore-config-ref/#inline-compression
compression_mode: none
# gives a hint (%) to Ceph in terms of expected consumption of the total cluster capacity of a given pool
# for more info: https://docs.ceph.com/docs/master/rados/operations/placement-groups/#specifying-expected-pool-size
#target_size_ratio: ".5"
# The pool spec used to create the data pool. Can use replication or erasure coding.
dataPool:
failureDomain: host
replicated:
size: 3
# Disallow setting pool with replica 1, this could lead to data loss without recovery.
# Make sure you're *ABSOLUTELY CERTAIN* that is what you want
requireSafeReplicaSize: true
parameters:
# Inline compression mode for the data pool
# Further reference: https://docs.ceph.com/docs/master/rados/configuration/bluestore-config-ref/#inline-compression
compression_mode: none
# gives a hint (%) to Ceph in terms of expected consumption of the total cluster capacity of a given pool
# for more info: https://docs.ceph.com/docs/master/rados/operations/placement-groups/#specifying-expected-pool-size
#target_size_ratio: ".5"
# Whether to preserve metadata and data pools on object store deletion
preservePoolsOnDelete: false
# The gateway service configuration
gateway:
# A reference to the secret in the rook namespace where the ssl certificate is stored
# sslCertificateRef:
# A reference to the secret in the rook namespace where the ca bundle is stored
# caBundleRef:
# The port that RGW pods will listen on (http)
port: 80
# The port that RGW pods will listen on (https). An ssl certificate is required.
# securePort: 443
# The number of pods in the rgw deployment
# RGW Pod Replication 2 설정
instances: 2