Kubernetes 1.8无法删除pod

时间:2017-12-11 14:54:27

标签: kubernetes

我是一个kubernetes 1.8。我已经部署了很多服务,但是我有问题删除了一些pod,它永远不会删除。

这是pod描述:

[2017-12-11T15:05:03] Log file can be found in C:\DesktopAppConverter\96ad1636-984d-42d7-9bb3-328f332db1bb\logs\DesktopAppConverterSetup.log
[2017-12-11T15:05:03] Desktop App Converter 2.1.1.release_2017-10-25_17-08_813cf2829a8823824411be7075c2d457efea7288
[2017-12-11T15:05:03] --------------------------------------------------

Checking Prerequisites

[2017-12-11T15:05:03] Checking Windows Version to ensure it meets minimum requirements
[2017-12-11T15:05:03] Minimum Windows Version requirement is met.
[2017-12-11T15:05:03] --------------------------------------------------

Running Setup

[2017-12-11T15:05:03] Checking that the Base Image file 'C:\temp\APP\BaseImage-16299.wim' exists
[2017-12-11T15:05:03] Ensuring that the Base Image file 'C:\temp\APP\BaseImage-16299.wim' is a valid windows image
[2017-12-11T15:05:04] Testing for required Windows feature enabled
[2017-12-11T15:05:05] Testing for required feature enabled...
[2017-12-11T15:05:05] Required feature is enabled. Checking if reboot is required
[2017-12-11T15:05:07] Required feature is enabled.
[2017-12-11T15:05:07] Required Windows feature is enabled
[2017-12-11T15:05:07] Setting up expanded base image
[2017-12-11T15:05:07] Deleting any old expanded base image.
[2017-12-11T15:05:07] Checking if there is OS-Matching expanded base image.
[2017-12-11T15:05:07] Preparing to expand base image
[2017-12-11T15:05:07] Validating Base Image path: C:\temp\APP\BaseImage-16299.wim
[2017-12-11T15:05:07] Checking that the Base Image file 'C:\temp\APP\BaseImage-16299.wim' exists
[2017-12-11T15:05:07] Ensuring that the Base Image file 'C:\temp\APP\BaseImage-16299.wim' is a valid windows image
[2017-12-11T15:05:08] Ensure base image matches host OS
[2017-12-11T15:05:08] Testing if base image at C:\temp\APP\BaseImage-16299.wim is compatible with your OS
[2017-12-11T15:05:08] The base image version was determined to be 10.0.16299.0
[2017-12-11T15:05:08] Your Windows version was determined to be 10.0.16299.0
[2017-12-11T15:05:08] Ignoring revision numbers
[2017-12-11T15:05:08] Expanded base image at C:\temp\APP\BaseImage-16299.wim IS compatible with your OS
[2017-12-11T15:05:08] Expanding Base Image (this may take a while)
[2017-12-11T15:12:32] Processing Expanded Base Image at C:\ProgramData\Microsoft\Windows\Images\BaseImage-16299
[2017-12-11T15:12:36] An error occurred converting your application. Here is the full error record: 
[2017-12-11T15:12:36] 

PowerShell Error Record:
Ausnahme beim Aufrufen von "ProcessBaseLayer" mit 1 Argument(en):  "Der Wert liegt außerhalb des erwarteten Bereichs."
PowerShell Stack Trace:
bei Expand-BaseImage, C:\Program Files\WindowsApps\Microsoft.DesktopAppConverter_2.1.1.0_x64__8wekyb3d8bbwe\converter_util\BaseImageOps.ps1: Zeile 388
bei Setup-ExpandedImages, C:\Program Files\WindowsApps\Microsoft.DesktopAppConverter_2.1.1.0_x64__8wekyb3d8bbwe\Setup.ps1: Zeile 245
bei Setup-DesktopAppConverter, C:\Program Files\WindowsApps\Microsoft.DesktopAppConverter_2.1.1.0_x64__8wekyb3d8bbwe\Setup.ps1: Zeile 139
bei <ScriptBlock><Process>, C:\Program Files\WindowsApps\Microsoft.DesktopAppConverter_2.1.1.0_x64__8wekyb3d8bbwe\DesktopAppConverter.ps1: Zeile 382
bei <ScriptBlock>, <Keine Datei>: Zeile 1

Inner Exception[0]:
System.Management.Automation.MethodInvocationException: Ausnahme beim Aufrufen von "ProcessBaseLayer" mit 1 Argument(en):  "Der Wert liegt außerhalb des erwarteten Bereichs." ---> System.ArgumentException: Der Wert liegt außerhalb des erwarteten Bereichs.
     bei Microsoft.Windows.ComputeVirtualization.ContainerStorage.StorageFunctions.ProcessBaseImage(String path)
     bei Microsoft.Windows.ComputeVirtualization.ContainerStorage.ProcessBaseLayer(String path)
     bei CallSite.Target(Closure , CallSite , Type , Object )
     --- Ende der internen Ausnahmestapelüberwachung ---
     bei System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
     bei System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
     bei System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
     bei System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
     bei System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
     bei System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
     bei System.Management.Automation.PSScriptCmdlet.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess)
     bei System.Management.Automation.PSScriptCmdlet.DoEndProcessing()
     bei System.Management.Automation.CommandProcessorBase.Complete()
Inner Exception Stack Trace[0]
     bei System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
     bei System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
     bei System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
     bei System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
     bei System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
     bei System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
     bei System.Management.Automation.PSScriptCmdlet.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess)
     bei System.Management.Automation.PSScriptCmdlet.DoEndProcessing()
     bei System.Management.Automation.CommandProcessorBase.Complete()

Inner Exception[1]:
System.ArgumentException: Der Wert liegt außerhalb des erwarteten Bereichs.
     bei Microsoft.Windows.ComputeVirtualization.ContainerStorage.StorageFunctions.ProcessBaseImage(String path)
     bei Microsoft.Windows.ComputeVirtualization.ContainerStorage.ProcessBaseLayer(String path)
     bei CallSite.Target(Closure , CallSite , Type , Object )
Inner Exception Stack Trace[1]
     bei Microsoft.Windows.ComputeVirtualization.ContainerStorage.StorageFunctions.ProcessBaseImage(String path)
     bei Microsoft.Windows.ComputeVirtualization.ContainerStorage.ProcessBaseLayer(String path)
     bei CallSite.Target(Closure , CallSite , Type , Object )
[2017-12-11T15:12:36] The full error record is saved in the logs at C:\DesktopAppConverter\96ad1636-984d-42d7-9bb3-328f332db1bb\logs

这是pod列表,您可以在其中找到3个无法删除的pod:

BaseImage-16299

我尝试了很多命令以删除它但没有任何事情发生。 kubectl delete po / mypod --grace-period = 0 --force --namespace mynamespace

任何人都可以帮助我?

此致

2 个答案:

答案 0 :(得分:0)

在我看来,您正在使用Deployment API对象。因此,如果您删除pod,它将被重新创建。请尝试以下方法:

kubectl  get deployments

获取部署ID并执行

kubectl delete deployment DEP_ID

然后它将被删除。如果没有部署检查复制副本

答案 1 :(得分:0)

尝试重新启动主节点上的docker守护程序

此问题可能与您遇到的问题有关: https://github.com/kubernetes/kubernetes/issues/51835