Kustomize:版本“ kustomize.config.k8s.io/v1beta1”中没有与类型“ Kustomization”匹配的项

时间:2020-07-24 20:53:12

标签: kustomize

我是Kustomize的新手,并遇到以下错误:

错误:无法从发行清单中构建kubernetes对象:无法识别“”:版本“ kustomize.config.k8s.io/v1beta1”中与类型“ Kustomization”不匹配

但是我正在使用样板kustomization.yaml

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- deployment.yaml
- service.yaml

问题:组名(kustomize.config.k8s.io)是什么意思,为什么Kustomize无法识别类型?

1 个答案:

答案 0 :(得分:7)

所以这个api版本是正确的,尽管我仍然不确定为什么。为了克服此错误消息,我需要运行:

print('Old Directory') # Just to show Current Working Directory(Were youre running...
print(os.getcwd())#...the code)


os.chdir('C:\Program Files\Sony\Imaging Edge') #change current working directory to
#location specified in String. MAY NEED TO CHANGE depending on place app is saved

print('New Directory')#confirm it worked
print(os.getcwd())
sleep(1)

os.system('start Remote')#os function for starting .exe files
#start starts it. Remote is the app we want to start(Imaging Edge Remote)
sleep(7) #wait for Remote to open


#Commented out this section. Shouldn't be necessary
#pyautogui.click(710,744)#exit the shell screen step 1
#sleep(1)
#pyautogui.click(710,744)#exit the shell screen step 2
#sleep(7)


pyautogui.doubleClick(328,257) #chooses camera
sleep (10)
pyautogui.moveTo(1134,225)#move to photo taking button
sleep(1)
pyautogui.mouseDown(button = 'left')#take picture, mouse held down
sleep(1)
pyautogui.mouseUp(button = 'left')

#note: right now this program just takes one photo closes automatically...
#...make sure camera is ready to appear in the Remote:choose camera window
sleep(5)

os.system('TASKKILL /F /IM Remote.exe') #kills the program

我希望这对以后的人有所帮助!