使用Helm Chart部署Rook Operator

本文介绍如何使用Helm包管理器在Kubernetes集群上安装Rook Operator,并配置必要的组件来创建存储平台。文章详细说明了安装过程中的各项配置选项及不同渠道的使用方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

使用Helm Chart部署Rook Operator

Installs rook to create, configure, and manage Rook clusters on Kubernetes.

Introduction

This chart bootstraps a rook-operator deployment on a Kubernetes cluster using the Helm package manager.

Prerequisites

  • Kubernetes 1.6+

RBAC

If role-based access control (RBAC) is enabled in your cluster, you may need to give Tiller (the server-side component of Helm) additional permissions. If RBAC is not enabled, be sure to set rbacEnable to false when installing the chart.

# Create a ServiceAccount for Tiller in the `kube-system` namespace
kubectl -n kube-system create sa tiller

# Create a ClusterRoleBinding for Tiller
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller

# Patch Tiller's Deployment to use the new ServiceAccount
kubectl -n kube-system patch deploy/tiller-deploy -p '{"spec": {"template": {"spec": {"serviceAccountName": "tiller"}}}}'

Installing

The Rook Operator helm chart will install the basic components necessary to create a storage platform for your Kubernetes cluster. After the helm chart is installed, you will need to create a Rook cluster.

The helm install command deploys rook on the Kubernetes cluster in the default configuration. The configuration section lists the parameters that can be configured during installation.

Rook currently publishes builds to the alpha and master channels. In the future, beta and stable will also be available.

Alpha

The alpha channel is the most recent release of Rook that is considered ready for testing by the community.

helm repo add rook-alpha https://charts.rook.io/alpha
helm install rook-alpha/rook

Master

The master channel includes the latest commits, with all automated tests green. Historically it has been very stable, though there is no guarantee.

To install the helm chart from master, you will need to pass the specific version returned by the search command.

helm repo add rook-master https://charts.rook.io/master
helm search rook
helm install rook-master/rook --version <version>

For example:

helm install rook-master/rook --version v0.6.0-156.gef983d6

Development Build

To deploy from a local build from your development environment:

  1. Build the Rook docker image: make
  2. Copy the image to your K8s cluster, such as with the docker save then the docker load commands
  3. Install the helm chart
    cd cluster/charts/rook
    helm install --name rook --namespace rook-system .
    

Uninstalling the Chart

To uninstall/delete the rook deployment:

$ helm delete --purge rook

The command removes all the Kubernetes components associated with the chart and deletes the release.

Configuration

The following tables lists the configurable parameters of the rook-operator chart and their default values.

ParameterDescriptionDefault
image.repositoryImagerook/rook
image.tagImage tagmaster
image.pullPolicyImage pull policyIfNotPresent
rbacEnableIf true, create & use RBAC resourcestrue
resourcesPod resource requests & limits{}
logLevelGlobal log levelINFO
agent.flexVolumeDirPathPath where the Rook agent discovers the flex volume plugins/usr/libexec/kubernetes/kubelet-plugins/volume/exec/
agent.tolerationToleration for the agent pods 
agent.tolerationKeyThe specific key of the taint to tolerate 
mon.healthCheckIntervalThe frequency for the operator to check the mon health45s
mon.monOutTimeoutThe time to wait before failing over an unhealthy mon300s

Command Line

You can pass the settings with helm command line parameters. Specify each parameter using the --set key=value[,key=value]argument to helm install. For example, the following command will install rook where RBAC is not enabled.

$ helm install --name rook rook-alpha/rook --set rbacEnable=false

Settings File

Alternatively, a yaml file that specifies the values for the above parameters (values.yaml) can be provided while installing the chart.

$ helm install --name rook rook-alpha/rook -f values.yaml

Here are the sample settings to get you started.

image:
  prefix: rook
  repository: rook/rook
  tag: master
  pullPolicy: IfNotPresent

resources:
  limits:
    cpu: 100m
    memory: 128Mi
  requests:
    cpu: 100m
    memory: 128Mi

rbacEnable: true

转载于:https://my.oschina.net/u/2306127/blog/1627182

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值