mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-09-26 04:58:07 +00:00
30 lines
48 KiB
HTML
30 lines
48 KiB
HTML
<!doctype html>
|
||
<html lang="zh" dir="ltr" class="docs-wrapper docs-doc-page docs-version-current plugin-docs plugin-id-default docs-doc-id-faq/technical-items" data-has-hydrated="false">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="generator" content="Docusaurus v2.4.3">
|
||
<title data-rh="true">技术 | Rancher</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://ranchermanager.docs.rancher.com/zh/faq/technical-items"><meta data-rh="true" name="docusaurus_locale" content="zh"><meta data-rh="true" name="docsearch:language" content="zh"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="技术 | Rancher"><meta data-rh="true" name="description" content="如何重置管理员密码?"><meta data-rh="true" property="og:description" content="如何重置管理员密码?"><link data-rh="true" rel="icon" href="/zh/img/favicon.png"><link data-rh="true" rel="canonical" href="https://ranchermanager.docs.rancher.com/zh/faq/technical-items"><link data-rh="true" rel="alternate" href="https://ranchermanager.docs.rancher.com/faq/technical-items" hreflang="en"><link data-rh="true" rel="alternate" href="https://ranchermanager.docs.rancher.com/zh/faq/technical-items" hreflang="zh"><link data-rh="true" rel="alternate" href="https://ranchermanager.docs.rancher.com/faq/technical-items" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://30NEY6C9UY-dsn.algolia.net" crossorigin="anonymous"><link rel="preconnect" href="https://www.googletagmanager.com">
|
||
<script>window.dataLayer=window.dataLayer||[]</script>
|
||
<script>!function(e,t,a,n,g){e[n]=e[n]||[],e[n].push({"gtm.start":(new Date).getTime(),event:"gtm.js"});var m=t.getElementsByTagName(a)[0],r=t.createElement(a);r.async=!0,r.src="https://www.googletagmanager.com/gtm.js?id=GTM-57KS2MW",m.parentNode.insertBefore(r,m)}(window,document,"script","dataLayer")</script>
|
||
|
||
|
||
|
||
<link rel="search" type="application/opensearchdescription+xml" title="Rancher" href="/zh/opensearch.xml">
|
||
|
||
|
||
|
||
<script src="https://cdn.cookielaw.org/scripttemplates/otSDKStub.js" charset="UTF-8" data-domain-script="0f98beb0-fc4c-417d-a42e-564e2cae42d2" async></script>
|
||
<script src="/scripts/optanonwrapper.js" async></script><link rel="stylesheet" href="/zh/assets/css/styles.29ec6351.css">
|
||
<link rel="preload" href="/zh/assets/js/runtime~main.7955d3d3.js" as="script">
|
||
<link rel="preload" href="/zh/assets/js/main.129d8862.js" as="script">
|
||
</head>
|
||
<body class="navigation-with-keyboard">
|
||
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-57KS2MW" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||
|
||
|
||
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}return t}()||function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
|
||
<div role="region" aria-label="跳到主要内容"><a class="skipToContent_fXgn" href="#__docusaurus_skipToContent_fallback">跳到主要内容</a></div><nav aria-label="主导航" class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="切换导航栏" aria-expanded="false" class="navbar__toggle clean-btn" type="button"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/zh/"><div class="navbar__logo"><img src="/zh/img/rancher-logo-horiz-color.svg" alt="logo" class="themedImage_ToTc themedImage--light_HNdA"><img src="/zh/img/rancher-logo-horiz-color.svg" alt="logo" class="themedImage_ToTc themedImage--dark_i4oU"></div><b class="navbar__title text--truncate"></b></a><div class="navbar__item dropdown dropdown--hoverable"><a aria-current="page" class="navbar__link active" aria-haspopup="true" aria-expanded="false" role="button" href="/zh/">Latest</a><ul class="dropdown__menu"><li><a aria-current="page" class="dropdown__link dropdown__link--active" href="/zh/faq/technical-items">Latest</a></li><li><a class="dropdown__link" href="/zh/v2.9/faq/technical-items">v2.9 (Preview)</a></li><li><a class="dropdown__link" href="/zh/v2.8/faq/technical-items">v2.8</a></li><li><a class="dropdown__link" href="/zh/v2.7/faq/technical-items">v2.7</a></li><li><a class="dropdown__link" href="/zh/v2.6/faq/technical-items">v2.6</a></li><li><a class="dropdown__link" href="/zh/v2.5/faq/technical-items">v2.5</a></li><li><a class="dropdown__link" href="/zh/v2.0-v2.4/faq/technical-items">v2.0-v2.4</a></li><li><a class="dropdown__link" href="/zh/versions">All versions</a></li></ul></div><div class="navbar__item dropdown dropdown--hoverable"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link"><svg viewBox="0 0 24 24" width="20" height="20" aria-hidden="true" class="iconLanguage_nlXk"><path fill="currentColor" d="M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"></path></svg>简体中文</a><ul class="dropdown__menu"><li><a href="/faq/technical-items" target="_self" rel="noopener noreferrer" class="dropdown__link" lang="en">English</a></li><li><a href="/zh/faq/technical-items" target="_self" rel="noopener noreferrer" class="dropdown__link dropdown__link--active" lang="zh">简体中文</a></li></ul></div><div class="searchBox_ZlJk"><button type="button" class="DocSearch DocSearch-Button" aria-label="搜索"><span class="DocSearch-Button-Container"><svg width="20" height="20" class="DocSearch-Search-Icon" viewBox="0 0 20 20"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">搜索</span></span><span class="DocSearch-Button-Keys"></span></button></div></div><div class="navbar__items navbar__items--right"><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">Quick Links</a><ul class="dropdown__menu"><li><a href="https://github.com/rancher/rancher" target="_blank" rel="noopener noreferrer" class="dropdown__link">GitHub<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li><a href="https://github.com/rancher/rancher-docs" target="_blank" rel="noopener noreferrer" class="dropdown__link">Docs GitHub<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">More from SUSE</a><ul class="dropdown__menu"><li><a href="https://www.rancher.com" target="_blank" rel="noopener noreferrer" class="dropdown__link navbar__icon navbar__rancher">Rancher<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li><hr style="margin: 0.3rem 0;"></li><li><a href="https://elemental.docs.rancher.com/" target="_blank" rel="noopener noreferrer" class="dropdown__link navbar__icon navbar__elemental">Elemental<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li><a href="https://fleet.rancher.io/" target="_blank" rel="noopener noreferrer" class="dropdown__link navbar__icon navbar__fleet">Fleet<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li><a href="https://harvesterhci.io" target="_blank" rel="noopener noreferrer" class="dropdown__link navbar__icon navbar__harvester">Harvester<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li><a href="https://rancherdesktop.io/" target="_blank" rel="noopener noreferrer" class="dropdown__link navbar__icon navbar__rancher__desktop">Rancher Desktop<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li><hr style="margin: 0.3rem 0;"></li><li><a href="https://opensource.suse.com" target="_blank" rel="noopener noreferrer" class="dropdown__link navbar__icon navbar__suse">More Projects...<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div id="__docusaurus_skipToContent_fallback" class="main-wrapper mainWrapper_z2l0 docsWrapper_BCFX"><button aria-label="回到顶部" class="clean-btn theme-back-to-top-button backToTopButton_sjWU" type="button"></button><div class="docPage__5DB"><aside class="theme-doc-sidebar-container docSidebarContainer_b6E3"><div class="sidebarViewport_Xe31"><div class="sidebar_njMd"><nav aria-label="文档侧边栏" class="menu thin-scrollbar menu_SIkG"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/zh/">什么是 Rancher?</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh/getting-started/overview">开始使用</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh/how-to-guides/new-user-guides">操作指南</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh/reference-guides/best-practices">参考指南</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist" aria-expanded="false" href="/zh/integrations-in-rancher">Rancher 中的集成</a><button aria-label="打开/收起侧边栏菜单「Rancher 中的集成」" type="button" class="clean-btn menu__caret"></button></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret menu__link--active" aria-expanded="true" href="/zh/faq/general-faq">常见问题</a></div><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh/faq/general-faq">一般常见问题解答</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh/faq/deprecated-features">Rancher 中已弃用的功能</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh/faq/install-and-configure-kubectl">安装和配置 kubectl</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh/faq/dockershim">Dockershim</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/zh/faq/technical-items">技术</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh/faq/security">安全</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh/faq/telemetry">遥测</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh/faq/container-network-interface-providers">CNI 网络插件</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh/faq/rancher-is-no-longer-needed">卸载 Rancher</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh/troubleshooting/general-troubleshooting">故障排除</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh/api/quickstart">Rancher Kubernetes API</a></div></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/zh/contribute-to-rancher">参与 Rancher 社区贡献</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/zh/glossary">Glossary</a></li></ul></nav></div></div></aside><main class="docMainContainer_gTbr"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_VOVn"><div class="docItemContainer_Djhp"><article><nav class="theme-doc-breadcrumbs breadcrumbsContainer_Z_bl" aria-label="页面路径"><ul class="breadcrumbs" itemscope="" itemtype="https://schema.org/BreadcrumbList"><li class="breadcrumbs__item"><a aria-label="主页面" class="breadcrumbs__link" href="/zh/"><svg viewBox="0 0 24 24" class="breadcrumbHomeIcon_YNFT"><path d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z" fill="currentColor"></path></svg></a></li><li class="breadcrumbs__item"><span class="breadcrumbs__link">常见问题</span><meta itemprop="position" content="1"></li><li itemscope="" itemprop="itemListElement" itemtype="https://schema.org/ListItem" class="breadcrumbs__item breadcrumbs__item--active"><span class="breadcrumbs__link" itemprop="name">技术</span><meta itemprop="position" content="2"></li></ul></nav><span class="theme-doc-version-badge badge badge--secondary">版本:Latest</span><div class="tocCollapsible_ETCw theme-doc-toc-mobile tocMobile_ITEo"><button type="button" class="clean-btn tocCollapsibleButton_TO0P">本页总览</button></div><div class="theme-doc-markdown markdown"><header><h1>技术</h1></header><h3 class="anchor anchorWithStickyNavbar_LWe7" id="如何重置管理员密码">如何重置管理员密码?<a href="#如何重置管理员密码" class="hash-link" aria-label="标题的直接链接" title="标题的直接链接"></a></h3><p>Docker 安装:</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token plain">$ docker exec -ti <container_id> reset-password</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">New password for default administrator (user-xxxxx):</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"><new_password></span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="复制代码到剪贴板" title="复制" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>Kubernetes 安装(Helm):</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token plain">$ KUBECONFIG=./kube_config_cluster.yml</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">$ kubectl --kubeconfig $KUBECONFIG -n cattle-system exec $(kubectl --kubeconfig $KUBECONFIG -n cattle-system get pods -l app=rancher --no-headers | head -1 | awk '{ print $1 }') -c rancher -- reset-password</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">New password for default administrator (user-xxxxx):</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"><new_password></span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="复制代码到剪贴板" title="复制" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><h3 class="anchor anchorWithStickyNavbar_LWe7" id="我删除停用了最后一个-admin该如何解决">我删除/停用了最后一个 admin,该如何解决?<a href="#我删除停用了最后一个-admin该如何解决" class="hash-link" aria-label="标题的直接链接" title="标题的直接链接"></a></h3><p>Docker 安装:</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token plain">$ docker exec -ti <container_id> ensure-default-admin</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">New default administrator (user-xxxxx)</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">New password for default administrator (user-xxxxx):</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"><new_password></span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="复制代码到剪贴板" title="复制" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>Kubernetes 安装(Helm):</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token plain">$ KUBECONFIG=./kube_config_cluster.yml</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">$ kubectl --kubeconfig $KUBECONFIG -n cattle-system exec $(kubectl --kubeconfig $KUBECONFIG -n cattle-system get pods -l app=rancher | grep '1/1' | head -1 | awk '{ print $1 }') -- ensure-default-admin</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">New password for default administrator (user-xxxxx):</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"><new_password></span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="复制代码到剪贴板" title="复制" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><h3 class="anchor anchorWithStickyNavbar_LWe7" id="如何启用调试日志记录">如何启用调试日志记录?<a href="#如何启用调试日志记录" class="hash-link" aria-label="标题的直接链接" title="标题的直接链接"></a></h3><p>请参阅<a href="/zh/troubleshooting/other-troubleshooting-tips/logging">故障排除:日志记录</a>。</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="我的-clusterip-不响应-ping该如何解决">我的 ClusterIP 不响应 ping,该如何解决?<a href="#我的-clusterip-不响应-ping该如何解决" class="hash-link" aria-label="标题的直接链接" title="标题的直接链接"></a></h3><p>ClusterIP 是一个虚拟 IP,不会响应 ping。要测试 ClusterIP 是否配置正确,最好的方法是使用 <code>curl</code> 访问 IP 和端口并检查它是否响应。</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="在哪里管理节点模板">在哪里管理节点模板?<a href="#在哪里管理节点模板" class="hash-link" aria-label="标题的直接链接" title="标题的直接链接"></a></h3><p>打开你的账号菜单(右上角)并选择<code>节点模板</code>。</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="为什么我的四层负载均衡器处于-pending-状态">为什么我的四层负载均衡器处于 <code>Pending</code> 状态?<a href="#为什么我的四层负载均衡器处于-pending-状态" class="hash-link" aria-label="标题的直接链接" title="标题的直接链接"></a></h3><p>四层负载均衡器创建为 <code>type: LoadBalancer</code>。Kubernetes 需要一个可以满足这些请求的云提供商或控制器,否则这些请求将永远处于 <code>Pending</code> 状态。有关更多信息,请参阅<a href="/zh/pages-for-subheaders/set-up-cloud-providers.md">云提供商</a>或<a href="https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/" target="_blank" rel="noopener noreferrer">创建外部负载均衡器</a>。</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="rancher-的状态存储在哪里">Rancher 的状态存储在哪里?<a href="#rancher-的状态存储在哪里" class="hash-link" aria-label="标题的直接链接" title="标题的直接链接"></a></h3><ul><li>Docker 安装:在 <code>rancher/rancher</code> 容器的嵌入式 etcd 中,位于 <code>/var/lib/rancher</code>。</li><li>Kubernetes install:在为运行 Rancher 而创建的 RKE 集群的 etcd 中。</li></ul><h3 class="anchor anchorWithStickyNavbar_LWe7" id="支持的-docker-版本是如何确定的">支持的 Docker 版本是如何确定的?<a href="#支持的-docker-版本是如何确定的" class="hash-link" aria-label="标题的直接链接" title="标题的直接链接"></a></h3><p>我们遵循上游 Kubernetes 版本验证过的 Docker 版本。如果需要获取验证过的版本,请查看 Kubernetes 版本 CHANGELOG.md 中的 <a href="https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.10.md#external-dependencies" target="_blank" rel="noopener noreferrer">External Dependencies</a>。</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="如何访问-rancher-创建的节点">如何访问 Rancher 创建的节点?<a href="#如何访问-rancher-创建的节点" class="hash-link" aria-label="标题的直接链接" title="标题的直接链接"></a></h3><p>你可以转到<strong>节点</strong>视图,然后下载用于访问 Rancher 创建的节点的 SSH 密钥。选择要访问的节点并单击行尾 <strong>⋮</strong> 按钮,然后选择<strong>下载密钥</strong>,如下图所示。</p><p><img loading="lazy" alt="下载密钥" src="/zh/assets/images/downloadsshkeys-617979ebc3df306cf60b60325923b283.png" width="442" height="426" class="img_ev3q"></p><p>解压缩下载的 zip 文件,并使用 <code>id_rsa</code> 文件连接到你的主机。请务必使用正确的用户名(如果是 RancherOS,则使用 <code>rancher</code> 或 <code>docker</code>;如果是 Ubuntu,则使用 <code>ubuntu</code>;如果是 Amazon Linux,则使用 <code>ec2-user</code>)。</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token plain">$ ssh -i id_rsa user@ip_of_node</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="复制代码到剪贴板" title="复制" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><h3 class="anchor anchorWithStickyNavbar_LWe7" id="如何在-rancher-中自动化任务-x">如何在 Rancher 中自动化任务 X?<a href="#如何在-rancher-中自动化任务-x" class="hash-link" aria-label="标题的直接链接" title="标题的直接链接"></a></h3><p>UI 由静态文件组成,并根据 API 的响应工作。换言之,UI 中可以执行的每个操作/任务都可以通过 API 进行自动化。有两种方法可以实现这一点:</p><ul><li>访问 <code>https://your_rancher_ip/v3</code> 并浏览 API 选项。</li><li>在使用 UI 时捕获 API 调用(通常使用 <a href="https://developers.google.com/web/tools/chrome-devtools/#network" target="_blank" rel="noopener noreferrer">Chrome 开发者工具</a>,但你也可以使用其他工具)。</li></ul><h3 class="anchor anchorWithStickyNavbar_LWe7" id="节点的-ip-地址改变了该如何恢复">节点的 IP 地址改变了,该如何恢复?<a href="#节点的-ip-地址改变了该如何恢复" class="hash-link" aria-label="标题的直接链接" title="标题的直接链接"></a></h3><p>节点需要配置静态 IP(或使用 DHCP 保留的 IP)。如果节点的 IP 已更改,你必须在集群中删除并重新添加它。删除后,Rancher 会将集群更新为正确的状态。如果集群不再处于 <code>Provisioning</code> 状态,则已从集群删除该节点。</p><p>节点的 IP 地址发生变化时,Rancher 会失去与节点的连接,因此无法正常清理节点。请参阅<a href="/zh/how-to-guides/new-user-guides/manage-clusters/clean-cluster-nodes">清理集群节点</a>来清理节点。</p><p>在集群中移除并清理节点时,你可以将节点重新添加到集群中。</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="如何将其他参数绑定环境变量添加到-rancher-启动的-kubernetes-集群的-kubernetes-组件中">如何将其他参数/绑定/环境变量添加到 Rancher 启动的 Kubernetes 集群的 Kubernetes 组件中?<a href="#如何将其他参数绑定环境变量添加到-rancher-启动的-kubernetes-集群的-kubernetes-组件中" class="hash-link" aria-label="标题的直接链接" title="标题的直接链接"></a></h3><p>你可以使用集群选项中的<a href="/zh/reference-guides/cluster-configuration/rancher-server-configuration/rke1-cluster-configuration#rke-%E9%9B%86%E7%BE%A4%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6%E5%8F%82%E8%80%83">配置文件</a>选项来添加其他参数/绑定/环境变量。有关详细信息,请参阅 RKE 文档中的<a href="https://rancher.com/docs/rke/latest/en/config-options/services/services-extras/" target="_blank" rel="noopener noreferrer">其他参数、绑定和环境变量</a>,或浏览 <a href="https://rancher.com/docs/rke/latest/en/example-yamls/" target="_blank" rel="noopener noreferrer">Cluster.ymls 示例</a>。</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="如何检查证书链是否有效">如何检查证书链是否有效?<a href="#如何检查证书链是否有效" class="hash-link" aria-label="标题的直接链接" title="标题的直接链接"></a></h3><p>使用 <code>openssl verify</code> 命令来验证你的证书链:</p><div class="theme-admonition theme-admonition-tip alert alert--success admonition_LlT9"><div class="admonitionHeading_tbUL"><span class="admonitionIcon_kALy"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>提示</div><div class="admonitionContent_S0QG"><p>将 <code>SSL_CERT_DIR</code> 和 <code>SSL_CERT_FILE</code> 配置到虚拟位置,从而确保在手动验证时不使用操作系统安装的证书。</p></div></div><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token plain">SSL_CERT_DIR=/dummy SSL_CERT_FILE=/dummy openssl verify -CAfile ca.pem rancher.yourdomain.com.pem</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">rancher.yourdomain.com.pem: OK</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="复制代码到剪贴板" title="复制" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>如果你看到 <code>unable to get local issuer certificate</code> 错误,则表示链不完整。通常情况下,这表示你的服务器证书由中间 CA 颁发。如果你已经拥有此证书,你可以在证书的验证中使用它,如下所示:</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token plain">SSL_CERT_DIR=/dummy SSL_CERT_FILE=/dummy openssl verify -CAfile ca.pem -untrusted intermediate.pem rancher.yourdomain.com.pem</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">rancher.yourdomain.com.pem: OK</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="复制代码到剪贴板" title="复制" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>如果你已成功验证证书链,你需要在服务器证书中包含所需的中间 CA 证书,从而完成与 Rancher 连接的证书链(例如,使用 Rancher Agent)。服务器证书文件中证书的顺序首先是服务器证书本身(<code>rancher.yourdomain.com.pem</code> 的内容),然后是中间 CA 证书(<code>intermediate.pem</code> 的内容):</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token plain">-----BEGIN CERTIFICATE-----</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">%YOUR_CERTIFICATE%</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">-----END CERTIFICATE-----</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">-----BEGIN CERTIFICATE-----</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">%YOUR_INTERMEDIATE_CERTIFICATE%</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">-----END CERTIFICATE-----</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="复制代码到剪贴板" title="复制" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>如果在验证过程中仍然出现错误,你可以运行以下命令,检索服务器证书的主题和颁发者:</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token plain">openssl x509 -noout -subject -issuer -in rancher.yourdomain.com.pem</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">subject= /C=GB/ST=England/O=Alice Ltd/CN=rancher.yourdomain.com</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">issuer= /C=GB/ST=England/O=Alice Ltd/CN=Alice Intermediate CA</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="复制代码到剪贴板" title="复制" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><h3 class="anchor anchorWithStickyNavbar_LWe7" id="如何在服务器证书中检查-common-name-和-subject-alternative-names">如何在服务器证书中检查 <code>Common Name</code> 和 <code>Subject Alternative Names</code>?<a href="#如何在服务器证书中检查-common-name-和-subject-alternative-names" class="hash-link" aria-label="标题的直接链接" title="标题的直接链接"></a></h3><p>虽然技术上仅需要 <code>Subject Alternative Names</code> 中有一个条目,但在 <code>Common Name</code> 和 <code>Subject Alternative Names</code> 中都包含主机名可以最大程度地提高与旧版浏览器/应用程序的兼容性。</p><p>检查 <code>Common Name</code>:</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token plain">openssl x509 -noout -subject -in cert.pem</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain">subject= /CN=rancher.my.org</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="复制代码到剪贴板" title="复制" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><p>检查 <code>Subject Alternative Names</code>:</p><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token plain">openssl x509 -noout -in cert.pem -text | grep DNS</span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"> DNS:rancher.my.org</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="复制代码到剪贴板" title="复制" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><h3 class="anchor anchorWithStickyNavbar_LWe7" id="为什么节点发生故障时重新调度一个-pod-需要-5-分钟以上的时间">为什么节点发生故障时重新调度一个 pod 需要 5 分钟以上的时间?<a href="#为什么节点发生故障时重新调度一个-pod-需要-5-分钟以上的时间" class="hash-link" aria-label="标题的直接链接" title="标题的直接链接"></a></h3><p>这是以下默认 Kubernetes 设置的组合导致的:</p><ul><li>kubelet<ul><li><code>node-status-update-frequency</code>:指定 kubelet 将节点状态发布到 master 的频率(默认 10s)。</li></ul></li><li>kube-controller-manager<ul><li><code>node-monitor-period</code>:在 NodeController 中同步 NodeStatus 的周期(默认 5s)。</li><li><code>node-monitor-grace-period</code>:在将节点标记为不健康之前,允许节点无响应的时间长度(默认 40s)。</li><li><code>pod-eviction-timeout</code>:在故障节点上删除 pod 的宽限期(默认 5m0s)。</li></ul></li></ul><p>有关这些设置的更多信息,请参阅 <a href="https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/" target="_blank" rel="noopener noreferrer">Kubernetes:kubelet</a> 和 <a href="https://kubernetes.io/docs/reference/command-line-tools-reference/kube-controller-manager/" target="_blank" rel="noopener noreferrer">Kubernetes:kube-controller-manager</a>。</p><p>Kubernetes 1.13 默认启用 <code>TaintBasedEvictions</code> 功能。有关详细信息,请参阅 <a href="https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/#taint-based-evictions" target="_blank" rel="noopener noreferrer">Kubernetes:基于污点的驱逐</a>。</p><ul><li>kube-apiserver(Kubernetes 1.13 及更高版本)<ul><li><code>default-not-ready-toleration-seconds</code>:表示 <code>notReady:NoExecute</code> 的容忍度的 <code>tolerationSeconds</code>,该设置默认添加到还没有该容忍度的 pod。</li><li><code>default-unreachable-toleration-seconds</code>:表示 <code>unreachable:NoExecute</code> 的容忍度的 <code>tolerationSeconds</code>,该设置默认添加到还没有该容忍度的 pod。</li></ul></li></ul><h3 class="anchor anchorWithStickyNavbar_LWe7" id="我可以在-ui-中使用键盘快捷键吗">我可以在 UI 中使用键盘快捷键吗?<a href="#我可以在-ui-中使用键盘快捷键吗" class="hash-link" aria-label="标题的直接链接" title="标题的直接链接"></a></h3><p>是的,你可以使用键盘快捷键访问 UI 的大部分内容。要查看快捷方式的概览,请在 UI 任意位置按 <code>?</code>。</p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/rancher/rancher-docs/edit/main/docs/faq/technical-items.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_Z9Sw" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>编辑此页</a></div><div class="col lastUpdated_vwxv"><span class="theme-last-updated">最后<!-- -->于 <b><time datetime="2023-06-05T21:20:47.000Z">2023年6月5日</time></b> <!-- -->更新</span></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="文档分页导航"><a class="pagination-nav__link pagination-nav__link--prev" href="/zh/faq/dockershim"><div class="pagination-nav__sublabel">上一页</div><div class="pagination-nav__label">Dockershim</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/zh/faq/security"><div class="pagination-nav__sublabel">下一页</div><div class="pagination-nav__label">安全</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#如何重置管理员密码" class="table-of-contents__link toc-highlight">如何重置管理员密码?</a></li><li><a href="#我删除停用了最后一个-admin该如何解决" class="table-of-contents__link toc-highlight">我删除/停用了最后一个 admin,该如何解决?</a></li><li><a href="#如何启用调试日志记录" class="table-of-contents__link toc-highlight">如何启用调试日志记录?</a></li><li><a href="#我的-clusterip-不响应-ping该如何解决" class="table-of-contents__link toc-highlight">我的 ClusterIP 不响应 ping,该如何解决?</a></li><li><a href="#在哪里管理节点模板" class="table-of-contents__link toc-highlight">在哪里管理节点模板?</a></li><li><a href="#为什么我的四层负载均衡器处于-pending-状态" class="table-of-contents__link toc-highlight">为什么我的四层负载均衡器处于 <code>Pending</code> 状态?</a></li><li><a href="#rancher-的状态存储在哪里" class="table-of-contents__link toc-highlight">Rancher 的状态存储在哪里?</a></li><li><a href="#支持的-docker-版本是如何确定的" class="table-of-contents__link toc-highlight">支持的 Docker 版本是如何确定的?</a></li><li><a href="#如何访问-rancher-创建的节点" class="table-of-contents__link toc-highlight">如何访问 Rancher 创建的节点?</a></li><li><a href="#如何在-rancher-中自动化任务-x" class="table-of-contents__link toc-highlight">如何在 Rancher 中自动化任务 X?</a></li><li><a href="#节点的-ip-地址改变了该如何恢复" class="table-of-contents__link toc-highlight">节点的 IP 地址改变了,该如何恢复?</a></li><li><a href="#如何将其他参数绑定环境变量添加到-rancher-启动的-kubernetes-集群的-kubernetes-组件中" class="table-of-contents__link toc-highlight">如何将其他参数/绑定/环境变量添加到 Rancher 启动的 Kubernetes 集群的 Kubernetes 组件中?</a></li><li><a href="#如何检查证书链是否有效" class="table-of-contents__link toc-highlight">如何检查证书链是否有效?</a></li><li><a href="#如何在服务器证书中检查-common-name-和-subject-alternative-names" class="table-of-contents__link toc-highlight">如何在服务器证书中检查 <code>Common Name</code> 和 <code>Subject Alternative Names</code>?</a></li><li><a href="#为什么节点发生故障时重新调度一个-pod-需要-5-分钟以上的时间" class="table-of-contents__link toc-highlight">为什么节点发生故障时重新调度一个 pod 需要 5 分钟以上的时间?</a></li><li><a href="#我可以在-ui-中使用键盘快捷键吗" class="table-of-contents__link toc-highlight">我可以在 UI 中使用键盘快捷键吗?</a></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container container-fluid"><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 SUSE Rancher. All Rights Reserved.</div></div></div></footer></div>
|
||
<script src="/zh/assets/js/runtime~main.7955d3d3.js"></script>
|
||
<script src="/zh/assets/js/main.129d8862.js"></script>
|
||
</body>
|
||
</html> |