mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-11-06 08:56:00 +00:00
594 lines
38 KiB
JavaScript
594 lines
38 KiB
JavaScript
"use strict";
|
|
(self["webpackChunkrancher_docs"] = self["webpackChunkrancher_docs"] || []).push([[41820],{
|
|
|
|
/***/ 3905:
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "Zo": () => (/* binding */ MDXProvider),
|
|
/* harmony export */ "kt": () => (/* binding */ createElement)
|
|
/* harmony export */ });
|
|
/* unused harmony exports MDXContext, useMDXComponents, withMDXComponents */
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(67294);
|
|
|
|
|
|
function _defineProperty(obj, key, value) {
|
|
if (key in obj) {
|
|
Object.defineProperty(obj, key, {
|
|
value: value,
|
|
enumerable: true,
|
|
configurable: true,
|
|
writable: true
|
|
});
|
|
} else {
|
|
obj[key] = value;
|
|
}
|
|
|
|
return obj;
|
|
}
|
|
|
|
function _extends() {
|
|
_extends = Object.assign || function (target) {
|
|
for (var i = 1; i < arguments.length; i++) {
|
|
var source = arguments[i];
|
|
|
|
for (var key in source) {
|
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
target[key] = source[key];
|
|
}
|
|
}
|
|
}
|
|
|
|
return target;
|
|
};
|
|
|
|
return _extends.apply(this, arguments);
|
|
}
|
|
|
|
function ownKeys(object, enumerableOnly) {
|
|
var keys = Object.keys(object);
|
|
|
|
if (Object.getOwnPropertySymbols) {
|
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
if (enumerableOnly) symbols = symbols.filter(function (sym) {
|
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
});
|
|
keys.push.apply(keys, symbols);
|
|
}
|
|
|
|
return keys;
|
|
}
|
|
|
|
function _objectSpread2(target) {
|
|
for (var i = 1; i < arguments.length; i++) {
|
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
|
|
if (i % 2) {
|
|
ownKeys(Object(source), true).forEach(function (key) {
|
|
_defineProperty(target, key, source[key]);
|
|
});
|
|
} else if (Object.getOwnPropertyDescriptors) {
|
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
} else {
|
|
ownKeys(Object(source)).forEach(function (key) {
|
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
});
|
|
}
|
|
}
|
|
|
|
return target;
|
|
}
|
|
|
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
if (source == null) return {};
|
|
var target = {};
|
|
var sourceKeys = Object.keys(source);
|
|
var key, i;
|
|
|
|
for (i = 0; i < sourceKeys.length; i++) {
|
|
key = sourceKeys[i];
|
|
if (excluded.indexOf(key) >= 0) continue;
|
|
target[key] = source[key];
|
|
}
|
|
|
|
return target;
|
|
}
|
|
|
|
function _objectWithoutProperties(source, excluded) {
|
|
if (source == null) return {};
|
|
|
|
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
|
|
var key, i;
|
|
|
|
if (Object.getOwnPropertySymbols) {
|
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
|
|
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
key = sourceSymbolKeys[i];
|
|
if (excluded.indexOf(key) >= 0) continue;
|
|
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
target[key] = source[key];
|
|
}
|
|
}
|
|
|
|
return target;
|
|
}
|
|
|
|
var isFunction = function isFunction(obj) {
|
|
return typeof obj === 'function';
|
|
};
|
|
|
|
var MDXContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext({});
|
|
var withMDXComponents = function withMDXComponents(Component) {
|
|
return function (props) {
|
|
var allComponents = useMDXComponents(props.components);
|
|
return /*#__PURE__*/React.createElement(Component, _extends({}, props, {
|
|
components: allComponents
|
|
}));
|
|
};
|
|
};
|
|
var useMDXComponents = function useMDXComponents(components) {
|
|
var contextComponents = react__WEBPACK_IMPORTED_MODULE_0__.useContext(MDXContext);
|
|
var allComponents = contextComponents;
|
|
|
|
if (components) {
|
|
allComponents = isFunction(components) ? components(contextComponents) : _objectSpread2(_objectSpread2({}, contextComponents), components);
|
|
}
|
|
|
|
return allComponents;
|
|
};
|
|
var MDXProvider = function MDXProvider(props) {
|
|
var allComponents = useMDXComponents(props.components);
|
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(MDXContext.Provider, {
|
|
value: allComponents
|
|
}, props.children);
|
|
};
|
|
|
|
var TYPE_PROP_NAME = 'mdxType';
|
|
var DEFAULTS = {
|
|
inlineCode: 'code',
|
|
wrapper: function wrapper(_ref) {
|
|
var children = _ref.children;
|
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, {}, children);
|
|
}
|
|
};
|
|
var MDXCreateElement = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(function (props, ref) {
|
|
var propComponents = props.components,
|
|
mdxType = props.mdxType,
|
|
originalType = props.originalType,
|
|
parentName = props.parentName,
|
|
etc = _objectWithoutProperties(props, ["components", "mdxType", "originalType", "parentName"]);
|
|
|
|
var components = useMDXComponents(propComponents);
|
|
var type = mdxType;
|
|
var Component = components["".concat(parentName, ".").concat(type)] || components[type] || DEFAULTS[type] || originalType;
|
|
|
|
if (propComponents) {
|
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component, _objectSpread2(_objectSpread2({
|
|
ref: ref
|
|
}, etc), {}, {
|
|
components: propComponents
|
|
}));
|
|
}
|
|
|
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component, _objectSpread2({
|
|
ref: ref
|
|
}, etc));
|
|
});
|
|
MDXCreateElement.displayName = 'MDXCreateElement';
|
|
function createElement (type, props) {
|
|
var args = arguments;
|
|
var mdxType = props && props.mdxType;
|
|
|
|
if (typeof type === 'string' || mdxType) {
|
|
var argsLength = args.length;
|
|
var createElementArgArray = new Array(argsLength);
|
|
createElementArgArray[0] = MDXCreateElement;
|
|
var newProps = {};
|
|
|
|
for (var key in props) {
|
|
if (hasOwnProperty.call(props, key)) {
|
|
newProps[key] = props[key];
|
|
}
|
|
}
|
|
|
|
newProps.originalType = type;
|
|
newProps[TYPE_PROP_NAME] = typeof type === 'string' ? type : mdxType;
|
|
createElementArgArray[1] = newProps;
|
|
|
|
for (var i = 2; i < argsLength; i++) {
|
|
createElementArgArray[i] = args[i];
|
|
}
|
|
|
|
return react__WEBPACK_IMPORTED_MODULE_0__.createElement.apply(null, createElementArgArray);
|
|
}
|
|
|
|
return react__WEBPACK_IMPORTED_MODULE_0__.createElement.apply(null, args);
|
|
}
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 48328:
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "assets": () => (/* binding */ assets),
|
|
/* harmony export */ "contentTitle": () => (/* binding */ contentTitle),
|
|
/* harmony export */ "default": () => (/* binding */ MDXContent),
|
|
/* harmony export */ "frontMatter": () => (/* binding */ frontMatter),
|
|
/* harmony export */ "metadata": () => (/* binding */ metadata),
|
|
/* harmony export */ "toc": () => (/* binding */ toc)
|
|
/* harmony export */ });
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(67294);
|
|
/* harmony import */ var _mdx_js_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3905);
|
|
/* @jsxRuntime classic */ /* @jsx mdx */ /* @jsxFrag React.Fragment */ function _define_property(obj, key, value) {
|
|
if (key in obj) {
|
|
Object.defineProperty(obj, key, {
|
|
value: value,
|
|
enumerable: true,
|
|
configurable: true,
|
|
writable: true
|
|
});
|
|
} else {
|
|
obj[key] = value;
|
|
}
|
|
return obj;
|
|
}
|
|
function _object_spread(target) {
|
|
for(var i = 1; i < arguments.length; i++){
|
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
var ownKeys = Object.keys(source);
|
|
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
}));
|
|
}
|
|
ownKeys.forEach(function(key) {
|
|
_define_property(target, key, source[key]);
|
|
});
|
|
}
|
|
return target;
|
|
}
|
|
function ownKeys(object, enumerableOnly) {
|
|
var keys = Object.keys(object);
|
|
if (Object.getOwnPropertySymbols) {
|
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
if (enumerableOnly) {
|
|
symbols = symbols.filter(function(sym) {
|
|
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
});
|
|
}
|
|
keys.push.apply(keys, symbols);
|
|
}
|
|
return keys;
|
|
}
|
|
function _object_spread_props(target, source) {
|
|
source = source != null ? source : {};
|
|
if (Object.getOwnPropertyDescriptors) {
|
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
} else {
|
|
ownKeys(Object(source)).forEach(function(key) {
|
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
});
|
|
}
|
|
return target;
|
|
}
|
|
function _object_without_properties(source, excluded) {
|
|
if (source == null) return {};
|
|
var target = _object_without_properties_loose(source, excluded);
|
|
var key, i;
|
|
if (Object.getOwnPropertySymbols) {
|
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
for(i = 0; i < sourceSymbolKeys.length; i++){
|
|
key = sourceSymbolKeys[i];
|
|
if (excluded.indexOf(key) >= 0) continue;
|
|
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
target[key] = source[key];
|
|
}
|
|
}
|
|
return target;
|
|
}
|
|
function _object_without_properties_loose(source, excluded) {
|
|
if (source == null) return {};
|
|
var target = {};
|
|
var sourceKeys = Object.keys(source);
|
|
var key, i;
|
|
for(i = 0; i < sourceKeys.length; i++){
|
|
key = sourceKeys[i];
|
|
if (excluded.indexOf(key) >= 0) continue;
|
|
target[key] = source[key];
|
|
}
|
|
return target;
|
|
}
|
|
|
|
|
|
const frontMatter = {
|
|
title: 'RKE 模板'
|
|
};
|
|
const contentTitle = undefined;
|
|
const metadata = {
|
|
"unversionedId": "pages-for-subheaders/about-rke1-templates",
|
|
"id": "version-2.7/pages-for-subheaders/about-rke1-templates",
|
|
"title": "RKE 模板",
|
|
"description": "RKE 模板旨在让 DevOps 和安全团队标准化和简化 Kubernetes 集群创建的流程。",
|
|
"source": "@site/i18n/zh/docusaurus-plugin-content-docs/version-2.7/pages-for-subheaders/about-rke1-templates.md",
|
|
"sourceDirName": "pages-for-subheaders",
|
|
"slug": "/pages-for-subheaders/about-rke1-templates",
|
|
"permalink": "/zh/v2.7/pages-for-subheaders/about-rke1-templates",
|
|
"draft": false,
|
|
"editUrl": "https://github.com/rancher/rancher-docs/edit/main/versioned_docs/version-2.7/pages-for-subheaders/about-rke1-templates.md",
|
|
"tags": [],
|
|
"version": "2.7",
|
|
"lastUpdatedAt": 1686092423,
|
|
"formattedLastUpdatedAt": "2023年6月6日",
|
|
"frontMatter": {
|
|
"title": "RKE 模板"
|
|
},
|
|
"sidebar": "tutorialSidebar",
|
|
"previous": {
|
|
"title": "主机驱动",
|
|
"permalink": "/zh/v2.7/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/about-provisioning-drivers/manage-node-drivers"
|
|
},
|
|
"next": {
|
|
"title": "模板创建者权限",
|
|
"permalink": "/zh/v2.7/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/about-rke1-templates/creator-permissions"
|
|
}
|
|
};
|
|
const assets = {};
|
|
const toc = [
|
|
{
|
|
value: '可配置的设置',
|
|
id: '可配置的设置',
|
|
level: 2
|
|
},
|
|
{
|
|
value: 'RKE 模板的范围',
|
|
id: 'rke-模板的范围',
|
|
level: 2
|
|
},
|
|
{
|
|
value: '示例场景',
|
|
id: '示例场景',
|
|
level: 2
|
|
},
|
|
{
|
|
value: '模板管理',
|
|
id: '模板管理',
|
|
level: 2
|
|
},
|
|
{
|
|
value: '应用模板',
|
|
id: '应用模板',
|
|
level: 2
|
|
},
|
|
{
|
|
value: '标准化硬件',
|
|
id: '标准化硬件',
|
|
level: 2
|
|
},
|
|
{
|
|
value: 'YAML 定制',
|
|
id: 'yaml-定制',
|
|
level: 2
|
|
},
|
|
{
|
|
value: '附加组件',
|
|
id: '附加组件',
|
|
level: 3
|
|
}
|
|
];
|
|
const layoutProps = {
|
|
toc
|
|
};
|
|
const MDXLayout = "wrapper";
|
|
function MDXContent(_param) {
|
|
var { components } = _param, props = _object_without_properties(_param, [
|
|
"components"
|
|
]);
|
|
return /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)(MDXLayout, _object_spread_props(_object_spread({}, layoutProps, props), {
|
|
components: components,
|
|
mdxType: "MDXLayout"
|
|
}), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `RKE 模板旨在让 DevOps 和安全团队标准化和简化 Kubernetes 集群创建的流程。`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `RKE 的全称是 `, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("a", {
|
|
parentName: "p",
|
|
"href": "https://rancher.com/docs/rke/latest/en/"
|
|
}, `Rancher Kubernetes Engine`), `,它是 Rancher 用来配置 Kubernetes 集群的工具。`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `随着 Kubernetes 越来越受欢迎,管理更多小型集群逐渐成为趋势。如果你想要创建大量集群,对集群进行一致管理尤为重要。多集群管理面临着安全和附件配置执行的挑战,在将集群移交给最终用户之前,这些配置需要标准化。`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `RKE 模板有助于标准化这些配置。无论是使用 Rancher UI、Rancher API 还是自动化流程创建的集群,Rancher 都将保证从 RKE 集群模板创建的每个集群在生成方式上是一致的。`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `管理员可以控制最终用户能更改的集群选项。RKE 模板还可以与特定的用户和组共享,以便管理员可以为不同的用户集创建不同的 RKE 模板。`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `如果集群是使用 RKE 模板创建的,则不能让集群使用另一个 RKE 模板。你只能将集群更新为同一模板的新版本。`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `你可以`, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("a", {
|
|
parentName: "p",
|
|
"href": "/zh/v2.7/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/about-rke1-templates/apply-templates#%E5%B0%86%E7%8E%B0%E6%9C%89%E9%9B%86%E7%BE%A4%E8%BD%AC%E6%8D%A2%E4%B8%BA%E4%BD%BF%E7%94%A8-rke-%E6%A8%A1%E6%9D%BF"
|
|
}, `将现有集群的配置保存为 RKE 模板`), `。这样,只有模板更新后才能更改集群的设置。新模板还可用于启动新集群。`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `RKE 模板的核心功能允许 DevOps 和安全团队:`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("ul", null, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("li", {
|
|
parentName: "ul"
|
|
}, `标准化集群配置并确保按照最佳实践创建 Rancher 配置的集群`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("li", {
|
|
parentName: "ul"
|
|
}, `配置集群时,防止用户做出不明智的选择`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("li", {
|
|
parentName: "ul"
|
|
}, `与不同的用户和组共享不同的模板`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("li", {
|
|
parentName: "ul"
|
|
}, `将模板的所有权委托给受信任的用户进行更改`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("li", {
|
|
parentName: "ul"
|
|
}, `控制哪些用户可以创建模板`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("li", {
|
|
parentName: "ul"
|
|
}, `要求用户使用模板来创建集群`)), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("h2", {
|
|
"id": "可配置的设置"
|
|
}, `可配置的设置`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `RKE 模板可以在 Rancher UI 中创建或以 YAML 格式定义。当你使用 Rancher 从基础设施提供商配置自定义节点或一般节点时,它们可以指定为相同的参数:`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("ul", null, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("li", {
|
|
parentName: "ul"
|
|
}, `云提供商选项`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("li", {
|
|
parentName: "ul"
|
|
}, `Pod 安全选项`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("li", {
|
|
parentName: "ul"
|
|
}, `网络提供商`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("li", {
|
|
parentName: "ul"
|
|
}, `Ingress Controller`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("li", {
|
|
parentName: "ul"
|
|
}, `网络安全配置`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("li", {
|
|
parentName: "ul"
|
|
}, `网络插件`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("li", {
|
|
parentName: "ul"
|
|
}, `私有镜像仓库 URL 和凭证`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("li", {
|
|
parentName: "ul"
|
|
}, `附加组件`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("li", {
|
|
parentName: "ul"
|
|
}, `Kubernetes 选项,包括 kube-api、kube-controller、kubelet 和服务等 Kubernetes 组件的配置`)), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `RKE 模板的`, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("a", {
|
|
parentName: "p",
|
|
"href": "#%E9%99%84%E5%8A%A0%E7%BB%84%E4%BB%B6"
|
|
}, `附加组件`), `的功能特别强大,因为它允许多种自定义选项。`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("h2", {
|
|
"id": "rke-模板的范围"
|
|
}, `RKE 模板的范围`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `Rancher 配置的集群支持 RKE 模板。模板可用于配置自定义集群或由基础设施提供商启动的集群。`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `RKE 模板用于定义 Kubernetes 和 Rancher 设置。节点模板负责配置节点。有关如何将 RKE 模板与硬件结合使用的参考,请参阅 `, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("a", {
|
|
parentName: "p",
|
|
"href": "/zh/v2.7/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/about-rke1-templates/infrastructure"
|
|
}, `RKE 模板和硬件`), `。`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `可以从头开始创建 RKE 模板来预先定义集群配置。它们可以用于启动新集群,也可以从现有的 RKE 集群导出模板。`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `现有集群的设置可以`, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("a", {
|
|
parentName: "p",
|
|
"href": "/zh/v2.7/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/about-rke1-templates/apply-templates#%E5%B0%86%E7%8E%B0%E6%9C%89%E9%9B%86%E7%BE%A4%E8%BD%AC%E6%8D%A2%E4%B8%BA%E4%BD%BF%E7%94%A8-rke-%E6%A8%A1%E6%9D%BF"
|
|
}, `保存为 RKE 模板`), `。这会创建一个新模板并将集群设置绑定到该模板。这样,集群只有在`, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("a", {
|
|
parentName: "p",
|
|
"href": "/zh/v2.7/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/about-rke1-templates/manage-rke1-templates#%E6%9B%B4%E6%96%B0%E6%A8%A1%E6%9D%BF"
|
|
}, `模板更新`), `的情况下才能`, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("a", {
|
|
parentName: "p",
|
|
"href": "/zh/v2.7/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/about-rke1-templates/manage-rke1-templates#%E5%8D%87%E7%BA%A7%E9%9B%86%E7%BE%A4%E4%BB%A5%E4%BD%BF%E7%94%A8%E6%96%B0%E7%9A%84%E6%A8%A1%E6%9D%BF%E4%BF%AE%E8%AE%A2%E7%89%88"
|
|
}, `使用新版本的模板`), `进行升级。新模板也可以用来创建新集群。`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("h2", {
|
|
"id": "示例场景"
|
|
}, `示例场景`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `如果一个组织同时拥有普通和高级 Rancher 用户,管理员可能希望为高级用户提供更多用于集群创建的选项,并限制普通用户的选项。`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `这些`, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("a", {
|
|
parentName: "p",
|
|
"href": "/zh/v2.7/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/about-rke1-templates/example-use-cases"
|
|
}, `示例场景`), `描述组织如何使用模板来标准化集群创建。`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `示例场景包括:`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("ul", null, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("li", {
|
|
parentName: "ul"
|
|
}, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("strong", {
|
|
parentName: "li"
|
|
}, `强制执行模板`), `:如果希望所有 Rancher 配置的新集群都具有某些设置,管理员可能想要`, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("a", {
|
|
parentName: "li",
|
|
"href": "/zh/v2.7/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/about-rke1-templates/example-use-cases#%E5%BC%BA%E5%88%B6%E6%89%A7%E8%A1%8C%E6%A8%A1%E6%9D%BF%E8%AE%BE%E7%BD%AE"
|
|
}, `为每个用户强制执行一项或多项模板设置`), `。`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("li", {
|
|
parentName: "ul"
|
|
}, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("strong", {
|
|
parentName: "li"
|
|
}, `与不同的用户共享不同的模板`), `:管理员可以为`, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("a", {
|
|
parentName: "li",
|
|
"href": "/zh/v2.7/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/about-rke1-templates/example-use-cases#%E6%99%AE%E9%80%9A%E7%94%A8%E6%88%B7%E5%92%8C%E9%AB%98%E7%BA%A7%E7%94%A8%E6%88%B7%E6%A8%A1%E6%9D%BF"
|
|
}, `普通用户和高级用户提供不同的模板`), `。这样,普通用户会有更多限制选项,而高级用户在创建集群时可以使用更多选项。`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("li", {
|
|
parentName: "ul"
|
|
}, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("strong", {
|
|
parentName: "li"
|
|
}, `更新模板设置`), `:如果组织的安全和 DevOps 团队决定将最佳实践嵌入到新集群所需的设置中,这些最佳实践可能会随着时间而改变。如果最佳实践发生变化,`, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("a", {
|
|
parentName: "li",
|
|
"href": "/zh/v2.7/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/about-rke1-templates/example-use-cases#%E6%9B%B4%E6%96%B0%E6%A8%A1%E6%9D%BF%E5%92%8C%E9%9B%86%E7%BE%A4"
|
|
}, `可以将模板更新为新版本`), `,这样,使用模板创建的集群可以`, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("a", {
|
|
parentName: "li",
|
|
"href": "/zh/v2.7/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/about-rke1-templates/manage-rke1-templates#%E5%8D%87%E7%BA%A7%E9%9B%86%E7%BE%A4%E4%BB%A5%E4%BD%BF%E7%94%A8%E6%96%B0%E7%9A%84%E6%A8%A1%E6%9D%BF%E4%BF%AE%E8%AE%A2%E7%89%88"
|
|
}, `升级到模板的新版本`), `。`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("li", {
|
|
parentName: "ul"
|
|
}, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("strong", {
|
|
parentName: "li"
|
|
}, `共享模板的所有权`), `:当模板所有者不再想要维护模板或想要共享模板的所有权时,此方案描述了如何`, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("a", {
|
|
parentName: "li",
|
|
"href": "/zh/v2.7/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/about-rke1-templates/example-use-cases#%E5%85%81%E8%AE%B8%E5%85%B6%E4%BB%96%E7%94%A8%E6%88%B7%E6%8E%A7%E5%88%B6%E5%92%8C%E5%85%B1%E4%BA%AB%E6%A8%A1%E6%9D%BF"
|
|
}, `共享模板所有权`), `。`)), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("h2", {
|
|
"id": "模板管理"
|
|
}, `模板管理`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `创建 RKE 模板时,可以在 Rancher UI 中的`, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("strong", {
|
|
parentName: "p"
|
|
}, `集群管理`), `下的 `, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("strong", {
|
|
parentName: "p"
|
|
}, `RKE 模板`), `中使用模板。创建模板后,你将成为模板所有者,这将授予你修改和共享模板的权限。你可以与特定用户或组共享 RKE 模板,也可以公开模板。`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `管理员可以开启模板强制执行,要求用户在创建集群时始终使用 RKE 模板。这使管理员可以保证 Rancher 总是创建指定配置的集群。`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `RKE 模板更新通过修订系统处理。如果要更改或更新模板,请创建模板的新版本。然后,可以将使用旧版本模板创建的集群升级到新模板修订版。`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `在 RKE 模板中,模板所有者可以限制设置的内容,也可以打开设置以供最终用户选择值。它们的差别体现在,创建模板时,Rancher UI 中的每个设置上的`, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("strong", {
|
|
parentName: "p"
|
|
}, `允许用户覆盖`), `标示。`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `对于无法覆盖的设置,最终用户将无法直接编辑它们。为了让用户使用这些设置的不同选项,RKE 模板所有者需要创建 RKE 模板的新版本,这将允许用户升级和更改该选项。`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `本节中的文件解释了 RKE 模板管理的细节:`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("ul", null, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("li", {
|
|
parentName: "ul"
|
|
}, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("a", {
|
|
parentName: "li",
|
|
"href": "/zh/v2.7/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/about-rke1-templates/creator-permissions"
|
|
}, `获取创建模板的权限`)), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("li", {
|
|
parentName: "ul"
|
|
}, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("a", {
|
|
parentName: "li",
|
|
"href": "/zh/v2.7/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/about-rke1-templates/manage-rke1-templates"
|
|
}, `创建和修改模板`)), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("li", {
|
|
parentName: "ul"
|
|
}, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("a", {
|
|
parentName: "li",
|
|
"href": "/zh/v2.7/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/about-rke1-templates/enforce-templates#%E5%BC%BA%E5%88%B6%E6%96%B0%E9%9B%86%E7%BE%A4%E4%BD%BF%E7%94%A8-rke-%E6%A8%A1%E6%9D%BF"
|
|
}, `强制执行模板设置`)), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("li", {
|
|
parentName: "ul"
|
|
}, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("a", {
|
|
parentName: "li",
|
|
"href": "/zh/v2.7/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/about-rke1-templates/override-template-settings"
|
|
}, `覆盖模板设置`)), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("li", {
|
|
parentName: "ul"
|
|
}, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("a", {
|
|
parentName: "li",
|
|
"href": "/zh/v2.7/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/about-rke1-templates/access-or-share-templates#%E4%B8%8E%E7%89%B9%E5%AE%9A%E7%94%A8%E6%88%B7%E6%88%96%E7%BB%84%E5%85%B1%E4%BA%AB%E6%A8%A1%E6%9D%BF"
|
|
}, `与集群创建者共享模板`)), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("li", {
|
|
parentName: "ul"
|
|
}, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("a", {
|
|
parentName: "li",
|
|
"href": "/zh/v2.7/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/about-rke1-templates/access-or-share-templates#%E5%85%B1%E4%BA%AB%E6%A8%A1%E6%9D%BF%E6%89%80%E6%9C%89%E6%9D%83"
|
|
}, `共享模板的所有权`))), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `你可以参见此`, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("a", {
|
|
parentName: "p",
|
|
"href": "/zh/v2.7/reference-guides/rke1-template-example-yaml"
|
|
}, `模板的示例 YAML 文件`), `作为参考。`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("h2", {
|
|
"id": "应用模板"
|
|
}, `应用模板`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `你可以使用你自己创建的模板来`, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("a", {
|
|
parentName: "p",
|
|
"href": "/zh/v2.7/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/about-rke1-templates/apply-templates#%E4%BD%BF%E7%94%A8-rke-%E6%A8%A1%E6%9D%BF%E5%88%9B%E5%BB%BA%E9%9B%86%E7%BE%A4"
|
|
}, `创建集群`), `,也可以使用`, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("a", {
|
|
parentName: "p",
|
|
"href": "/zh/v2.7/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/about-rke1-templates/access-or-share-templates"
|
|
}, `与你共享的模板`), `来创建集群。`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `如果 RKE 模板所有者创建了模板的新版本,你可以`, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("a", {
|
|
parentName: "p",
|
|
"href": "/zh/v2.7/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/about-rke1-templates/apply-templates#%E6%9B%B4%E6%96%B0%E4%BD%BF%E7%94%A8-rke-%E6%A8%A1%E6%9D%BF%E5%88%9B%E5%BB%BA%E7%9A%84%E9%9B%86%E7%BE%A4"
|
|
}, `将你的集群升级到该版本`), `。`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `可以从头开始创建 RKE 模板来预先定义集群配置。它们可以用于启动新集群,也可以从现有的 RKE 集群导出模板。`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `你可以`, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("a", {
|
|
parentName: "p",
|
|
"href": "/zh/v2.7/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/about-rke1-templates/apply-templates#%E5%B0%86%E7%8E%B0%E6%9C%89%E9%9B%86%E7%BE%A4%E8%BD%AC%E6%8D%A2%E4%B8%BA%E4%BD%BF%E7%94%A8-rke-%E6%A8%A1%E6%9D%BF"
|
|
}, `将现有集群的配置保存为 RKE 模板`), `。这样,只有模板更新后才能更改集群的设置。`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("h2", {
|
|
"id": "标准化硬件"
|
|
}, `标准化硬件`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `RKE 模板的目的是标准化 Kubernetes 和 Rancher 设置。如果你还想标准化你的基础设施,一个选择是将 RKE 模板与`, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("a", {
|
|
parentName: "p",
|
|
"href": "/zh/v2.7/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/about-rke1-templates/infrastructure"
|
|
}, `其他工具`), `一起使用。`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `另一种选择是使用包含节点池配置选项,但不强制执行配置的`, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("a", {
|
|
parentName: "p",
|
|
"href": "/zh/v2.7/how-to-guides/new-user-guides/manage-clusters/manage-cluster-templates"
|
|
}, `集群模板`), `。`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("h2", {
|
|
"id": "yaml-定制"
|
|
}, `YAML 定制`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `如果将 RKE 模板定义为 YAML 文件,则可以修改此`, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("a", {
|
|
parentName: "p",
|
|
"href": "/zh/v2.7/reference-guides/rke1-template-example-yaml"
|
|
}, `示例 RKE 模板 YAML`), `。RKE 模板中的 YAML 使用了 Rancher 在创建 RKE 集群时使用的相同自定义设置。但由于 YAML 要在 Rancher 配置的集群中使用,因此需要将 RKE 模板自定义项嵌套在 YAML 中的 `, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("inlineCode", {
|
|
parentName: "p"
|
|
}, `rancher_kubernetes_engine_config`), ` 参数下。`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `RKE 文档也提供`, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("a", {
|
|
parentName: "p",
|
|
"href": "https://rancher.com/docs/rke/latest/en/example-yamls/"
|
|
}, `注释的`), ` `, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("inlineCode", {
|
|
parentName: "p"
|
|
}, `cluster.yml`), ` 文件供你参考。`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `有关可用选项的更多信息,请参阅`, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("a", {
|
|
parentName: "p",
|
|
"href": "https://rancher.com/docs/rke/latest/en/config-options/"
|
|
}, `集群配置`), `上的 RKE 文档。`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("h3", {
|
|
"id": "附加组件"
|
|
}, `附加组件`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `RKE 模板配置文件的附加组件部分的工作方式与`, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("a", {
|
|
parentName: "p",
|
|
"href": "https://rancher.com/docs/rke/latest/en/config-options/add-ons/"
|
|
}, `集群配置文件的附加组件部分`), `相同。`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `用户定义的附加组件指令允许你调用和下拉 Kubernetes 清单或将它们直接内联。如果这些 YAML 清单包括在 RKE 模板中,Rancher 将在集群中部署这些 YAML 文件。`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `你可以使用附加组件执行以下操作:`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("ul", null, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("li", {
|
|
parentName: "ul"
|
|
}, `启动 Kubernetes 集群后,在集群上安装应用`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("li", {
|
|
parentName: "ul"
|
|
}, `在使用 Kubernetes Daemonset 部署的节点上安装插件`), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("li", {
|
|
parentName: "ul"
|
|
}, `自动设置命名空间、ServiceAccount 或角色绑定`)), /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("p", null, `RKE 模板配置必须嵌套在 `, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("inlineCode", {
|
|
parentName: "p"
|
|
}, `rancher_kubernetes_engine_config`), ` 参数中。要设置附加组件,在创建模板时单击`, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("strong", {
|
|
parentName: "p"
|
|
}, `以 YAML 文件编辑`), `。然后使用 `, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("inlineCode", {
|
|
parentName: "p"
|
|
}, `addons`), ` 指令添加清单,或使用 `, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("inlineCode", {
|
|
parentName: "p"
|
|
}, `addons_include`), ` 指令设置哪些 YAML 文件可用于附加组件。有关自定义附加组件的更多信息,请参见`, /*#__PURE__*/ (0,_mdx_js_react__WEBPACK_IMPORTED_MODULE_1__/* .mdx */ .kt)("a", {
|
|
parentName: "p",
|
|
"href": "https://rancher.com/docs/rke/latest/en/config-options/add-ons/user-defined-add-ons/"
|
|
}, `用户自定义附加组件文档`), `。`));
|
|
}
|
|
MDXContent.isMDXComponent = true;
|
|
|
|
|
|
/***/ })
|
|
|
|
}]); |