当前位置:网站首页>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 .
边栏推荐
- options should NOT have additional properties
- 鸿蒙第四次学习
- 链游系统开发(Unity3D链游开发详情)丨链游开发成熟技术源码
- M2DGR:多源多场景 地面机器人SLAM数据集(ICRA 2022 )
- Unity learning shader notes [82] black and white processing of enhanced single channel color rendering
- Nm02 nm module call sequence diagram and code interpretation independent of bus protocol
- Leetcode 面试题 17.01. 不用加号的加法
- ESP32-C3入门教程 问题篇⑪——esp-tls: create_ssl_handle failed, tls_io_instance->options.trusted_certs null
- 719. 找出第 K 小的数对距离
- Websocket of Web real-time communication technology
猜你喜欢

昨天阿里学长写了一个责任链模式,竟然出现了无数个bug

【西北工业大学】考研初试复试资料分享

Wechat applet video sharing platform system graduation design completion (7) Interim inspection report

能解决80%故障的排查思路
![[Northwestern Polytechnic University] information sharing of the first and second postgraduate examinations](/img/15/298ea6f7367741e1e085007c498e51.jpg)
[Northwestern Polytechnic University] information sharing of the first and second postgraduate examinations

QT official example: QT quick controls - Gallery

Qt官方示例:Qt Quick Controls - Gallery

【愚公系列】2022年07月 Go教学课程 001-Go语言前提简介

27:第三章:开发通行证服务:10:【注册/登录】接口:注册/登录OK后,把用户会话信息(uid,utoken)保存到redis和cookie中;(一个主要的点:设置cookie)

300+篇文献!一文详解基于Transformer的多模态学习最新进展
随机推荐
夜神模拟器+Fiddler抓包测试App
QQmlApplicationEngine
【西北工业大学】考研初试复试资料分享
又一所双非改考408,会爆冷么?南昌航空大学软件学院
Leetcode interview question 17.01 Addition without plus sign
材质UV遮罩的技巧
夜神模擬器+Fiddler抓包測試App
[Yugong series] July 2022 go teaching course 001 introduction to go language premise
【愚公系列】2022年07月 Go教学课程 001-Go语言前提简介
产品经理应具备的能力
Summary of fun free GM games
CDN acceleration and breaking J anti-theft chain function
Wechat applet video sharing platform system graduation design (2) applet function
元宇宙链游系统开发(逻辑开发)丨链游系统开发(详细分析)
深度神经网络总结
What is cloud primordial? This time, I can finally understand!
深度学习数学基础
The difference between promise and observable
饭卡 HDU2546
Detailed explanation of cjson usage
