让我们假设我有以下清单,例如部署,服务和入口。在默认名称空间中,一切正常。虽然我想将资源投入到用manifest.yaml创建的另一个命名空间。我以为如果写了 kubectl appy -f $ DIR ,它会按预期工作:将对象移动到另一个命名空间。但是什么都没有改变。
总而言之,如何强制将对象移动到另一个名称空间?
答案 0 :(得分:2)
您可以编辑所有部署Yaml以添加Arduino: 1.8.12 (Windows 10), Board: "Arduino Uno"
RFID-RC522_LED:10:14: error: 'MAX_LEN' was not declared in this scope
byte TagData[MAX_LEN]; // Variable used to store Full Tag Data
^~~~~~~
C:\Users\jeffo\Arduino\Code\RFID-RC522_LED\RFID-RC522_LED.ino: In function 'void setup()':
RFID-RC522_LED:22:7: error: 'class MFRC522' has no member named 'begin'
nfc.begin();
^~~~~
RFID-RC522_LED:23:22: error: 'class MFRC522' has no member named 'getFirmwareVersion'
byte version = nfc.getFirmwareVersion(); // Variable to store Firmware version of the Module
^~~~~~~~~~~~~~~~~~
C:\Users\jeffo\Arduino\Code\RFID-RC522_LED\RFID-RC522_LED.ino: In function 'void loop()':
RFID-RC522_LED:40:18: error: 'class MFRC522' has no member named 'requestTag'
FoundTag = nfc.requestTag(MF1_REQIDL, TagData);
^~~~~~~~~~
RFID-RC522_LED:40:29: error: 'MF1_REQIDL' was not declared in this scope
FoundTag = nfc.requestTag(MF1_REQIDL, TagData);
^~~~~~~~~~
RFID-RC522_LED:40:41: error: 'TagData' was not declared in this scope
FoundTag = nfc.requestTag(MF1_REQIDL, TagData);
^~~~~~~
RFID-RC522_LED:41:19: error: 'MI_OK' was not declared in this scope
if (FoundTag == MI_OK) {
^~~~~
C:\Users\jeffo\Arduino\Code\RFID-RC522_LED\RFID-RC522_LED.ino:41:19: note: suggested alternative: 'MISO'
if (FoundTag == MI_OK) {
^~~~~
MISO
RFID-RC522_LED:44:19: error: 'class MFRC522' has no member named 'antiCollision'
ReadTag = nfc.antiCollision(TagData);
^~~~~~~~~~~~~
exit status 1
'MAX_LEN' was not declared in this scope
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
,也可以运行namespace
。此命令会将所有Yamls部署到名称空间kubectl apply -f $DIR -n namespacename
编辑:
这里要理解的是,不能仅通过更改yaml中的名称空间将资源从一个名称空间移动到另一名称空间。如果这样做,它将在另一个名称空间中创建同一资源的另一个副本。正确的方法是从以前的名称空间中删除并在新的名称空间中重新创建。