mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-11-06 17:05:26 +00:00
1 line
7.0 KiB
JavaScript
1 line
7.0 KiB
JavaScript
"use strict";(self.webpackChunkrancher_docs=self.webpackChunkrancher_docs||[]).push([[8282],{3905:(e,n,t)=>{t.d(n,{Zo:()=>p,kt:()=>d});var r=t(67294);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function l(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function a(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?l(Object(t),!0).forEach((function(n){o(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function i(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)t=l[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var s=r.createContext({}),c=function(e){var n=r.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):a(a({},n),e)),t},p=function(e){var n=c(e.components);return r.createElement(s.Provider,{value:n},e.children)},u={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},h=r.forwardRef((function(e,n){var t=e.components,o=e.mdxType,l=e.originalType,s=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),h=c(t),d=o,g=h["".concat(s,".").concat(d)]||h[d]||u[d]||l;return t?r.createElement(g,a(a({ref:n},p),{},{components:t})):r.createElement(g,a({ref:n},p))}));function d(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var l=t.length,a=new Array(l);a[0]=h;var i={};for(var s in n)hasOwnProperty.call(n,s)&&(i[s]=n[s]);i.originalType=e,i.mdxType="string"==typeof e?e:o,a[1]=i;for(var c=2;c<l;c++)a[c]=t[c];return r.createElement.apply(null,a)}return r.createElement.apply(null,t)}h.displayName="MDXCreateElement"},69286:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>s,contentTitle:()=>a,default:()=>u,frontMatter:()=>l,metadata:()=>i,toc:()=>c});var r=t(87462),o=(t(67294),t(3905));const l={title:"Troubleshooting Controlplane Nodes"},a=void 0,i={unversionedId:"troubleshooting/kubernetes-components/troubleshooting-controlplane-nodes",id:"troubleshooting/kubernetes-components/troubleshooting-controlplane-nodes",title:"Troubleshooting Controlplane Nodes",description:"This section applies to nodes with the controlplane role.",source:"@site/docs/troubleshooting/kubernetes-components/troubleshooting-controlplane-nodes.md",sourceDirName:"troubleshooting/kubernetes-components",slug:"/troubleshooting/kubernetes-components/troubleshooting-controlplane-nodes",permalink:"/troubleshooting/kubernetes-components/troubleshooting-controlplane-nodes",draft:!1,editUrl:"https://github.com/rancher/rancher-docs/edit/main/docs/troubleshooting/kubernetes-components/troubleshooting-controlplane-nodes.md",tags:[],version:"current",lastUpdatedAt:1667002146,formattedLastUpdatedAt:"Oct 29, 2022",frontMatter:{title:"Troubleshooting Controlplane Nodes"},sidebar:"tutorialSidebar",previous:{title:"Troubleshooting etcd Nodes",permalink:"/troubleshooting/kubernetes-components/troubleshooting-etcd-nodes"},next:{title:"Troubleshooting nginx-proxy",permalink:"/troubleshooting/kubernetes-components/troubleshooting-nginx-proxy"}},s={},c=[{value:"Check if the Controlplane Containers are Running",id:"check-if-the-controlplane-containers-are-running",level:2},{value:"Controlplane Container Logging",id:"controlplane-container-logging",level:2},{value:"RKE2 Server Logging",id:"rke2-server-logging",level:2}],p={toc:c};function u(e){let{components:n,...t}=e;return(0,o.kt)("wrapper",(0,r.Z)({},p,t,{components:n,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"This section applies to nodes with the ",(0,o.kt)("inlineCode",{parentName:"p"},"controlplane")," role."),(0,o.kt)("h2",{id:"check-if-the-controlplane-containers-are-running"},"Check if the Controlplane Containers are Running"),(0,o.kt)("p",null,"There are three specific containers launched on nodes with the ",(0,o.kt)("inlineCode",{parentName:"p"},"controlplane")," role:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"kube-apiserver")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"kube-controller-manager")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"kube-scheduler"))),(0,o.kt)("p",null,"The containers should have status ",(0,o.kt)("strong",{parentName:"p"},"Up"),". The duration shown after ",(0,o.kt)("strong",{parentName:"p"},"Up")," is the time the container has been running."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"docker ps -a -f=name='kube-apiserver|kube-controller-manager|kube-scheduler'\n")),(0,o.kt)("p",null,"Example output:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},'CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES\n26c7159abbcc rancher/hyperkube:v1.11.5-rancher1 "/opt/rke-tools/en..." 3 hours ago Up 3 hours kube-apiserver\nf3d287ca4549 rancher/hyperkube:v1.11.5-rancher1 "/opt/rke-tools/en..." 3 hours ago Up 3 hours kube-scheduler\nbdf3898b8063 rancher/hyperkube:v1.11.5-rancher1 "/opt/rke-tools/en..." 3 hours ago Up 3 hours kube-controller-manager\n')),(0,o.kt)("h2",{id:"controlplane-container-logging"},"Controlplane Container Logging"),(0,o.kt)("admonition",{type:"note"},(0,o.kt)("p",{parentName:"admonition"},"If you added multiple nodes with the ",(0,o.kt)("inlineCode",{parentName:"p"},"controlplane")," role, both ",(0,o.kt)("inlineCode",{parentName:"p"},"kube-controller-manager")," and ",(0,o.kt)("inlineCode",{parentName:"p"},"kube-scheduler")," use a leader election process to determine the leader. Only the current leader will log the performed actions. See ",(0,o.kt)("a",{parentName:"p",href:"/troubleshooting/other-troubleshooting-tips/kubernetes-resources#kubernetes-leader-election"},"Kubernetes leader election")," how to retrieve the current leader.")),(0,o.kt)("p",null,"The logging of the containers can contain information on what the problem could be."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"docker logs kube-apiserver\ndocker logs kube-controller-manager\ndocker logs kube-scheduler\n")),(0,o.kt)("h2",{id:"rke2-server-logging"},"RKE2 Server Logging"),(0,o.kt)("p",null,"If Rancher provisions an RKE2 cluster that can't communicate with Rancher, you can run this command on a server node in the downstream cluster to get the RKE2 server logs:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"journalctl -u rke2-server -f\n")))}u.isMDXComponent=!0}}]); |