当前位置:网站首页>Troubleshooting: kubectl reports an error validationerror: unknown field \u00a0
Troubleshooting: kubectl reports an error validationerror: unknown field \u00a0
2022-07-02 18:44:00 【Migrant worker Lao Wang】
Blog home page :https://tomcat.blog.csdn.net
Blogger's nickname : Lao Wang of migrant workers
Main areas :Java、Linux、K8S
We look forward to your attention, praise and collection comments
Fault details
Recently k8s Through the cluster kubectl apply -f
When deploying resources , Encountered the following error . It was quickly solved at that time . Now record the faults and troubleshooting methods , To facilitate developers who encounter the same error .
error: error validating “nfs.yaml”: error validating data: [ValidationError(ServiceAccount): unknown field “\u00a0\u00a0name” in io.k8s.api.core.v1.ServiceAccount, ValidationError(ServiceAccount): unknown field “\u00a0\u00a0namespace” in io.k8s.api.core.v1.ServiceAccount]; if you choose to ignore these errors, turn validation off with --validate=false
The analysis reason
The error message has been clearly described , Because name Before “\u00a0\u00a0” Caused by two characters . We know through inquiry ,\u00a0 stay utf-8 In the encoding , Represents an uninterrupted space , Mainly used in office in , Let a word not wrap at the end . stay word in , Can pass ctrlshiftspace Input .
We are IDEA Open... In the editor nfs.yaml file , Then look for spaces , No match found name And all white space characters representing indentation . It also verifies the prompt message of error .
use Sublime Text open , It is easier to find differences :
It turns out the yaml The contents of the file are from a word Files are copied directly , Inadvertently, it contains some \u00a0 This special white space character .
Solve the problem
The solution is simple , Directly in the editor \u00a0 Replace with ordinary spaces ,IDEA,Sublime Text Can be easily realized .
After replacement, it can be deployed smoothly .
If you want to reprint , Please indicate the source of this article : Migrant worker Lao Wang's CSDN Blog https://blog.csdn.net/monarch91 .
边栏推荐
- 【每日一题】第一天
- 故障排查:kubectl报错ValidationError: unknown field \u00a0
- Chrome officially supports MathML, which is enabled in chromium dev 105 by default
- Esp32-c3 introductory tutorial question ⑪ - ESP tls: create_ ssl_ handle failed, tls_ io_ instance->options. trusted_ certs null
- UE4 draw a circle with spline
- Chrome 正式支持 MathML,默认在 Chromium Dev 105 中启用
- 深度神经网络总结
- Leetcode(81)——搜索旋转排序数组 II
- LightGroupButton* sender = static_cast<LightGroupButton*>(QObject::sender());
- ESP32-C3入门教程 问题篇⑪——esp-tls: create_ssl_handle failed, tls_io_instance->options.trusted_certs null
猜你喜欢
Simulateur nightGod + application de test de capture de paquets Fiddler
材质UV遮罩的技巧
exness深度好文:动性系列-黄金流动性实例分析(五)
Steamos 3.3 beta release, steam deck Chinese keyboard finally came
Qt官方示例:Qt Quick Controls - Gallery
Responses of different people in technology companies to bugs | daily anecdotes
Wechat nucleic acid detection appointment applet system graduation design completion (5) task statement
Leetcode 面试题 16.11. 跳水板
实施阴影介绍
【愚公系列】2022年07月 Go教学课程 001-Go语言前提简介
随机推荐
The difference between promise and observable
UE4 用spline畫正圓
Responses of different people in technology companies to bugs | daily anecdotes
exness深度好文:动性系列-黄金流动性实例分析(五)
消除IBM P750小机上的黄色报警灯[通俗易懂]
C语言中函数参数传递的三种方式
工业软件讲堂-三维CAD设计软件的核心技术解析----讲坛第二次讲座
719. Find the distance of the number pair with the smallest K
揭秘得物客服IM全链路通信过程
如何清理废弃pv和其对应的文件夹
Chrome officially supports MathML, which is enabled in chromium dev 105 by default
鸿蒙第四次学习
@Component 拿不到dao层
Leetcode interview question 16.15 Abacus wonderful calculation
options should NOT have additional properties
@Component cannot get Dao layer
Meal card hdu2546
Qt官方示例:Qt Quick Controls - Gallery
How to set vscode to delete the whole line shortcut key?
Yesterday, Alibaba senior wrote a responsibility chain model, and there were countless bugs