当前位置:网站首页>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 .
边栏推荐
- 服务器php环境搭建教程,PHP服务端环境搭建图文详解
- Leetcode (81) -- search rotation sort array II
- StretchDIBits函数
- Eliminate the yellow alarm light on IBM p750 small computer [easy to understand]
- 彻底搞懂基于Open3D的点云处理教程!
- UE4 draw a circle with spline
- Websocket of Web real-time communication technology
- 工业软件讲堂-三维CAD设计软件的核心技术解析----讲坛第二次讲座
- Summary of fun free GM games
- 如何优雅的写 Controller 层代码?
猜你喜欢

Responses of different people in technology companies to bugs | daily anecdotes

文字编辑器 希望有错误的句子用红色标红,文字编辑器用了markdown

Leetcode interview question 16.15 Abacus wonderful calculation

Leetcode (81) -- search rotation sort array II

什么是云原生?这回终于能搞明白了!

任职 22 年,PowerShell 之父将从微软离职:曾因开发 PowerShell 被微软降级过

NM01-独立于总线协议的NM模块功能概述与API定义

实施阴影介绍

再放寬!這些應届生,可直接落戶上海

Leetcode interview question 17.04 Vanishing numbers
随机推荐
C语言中函数参数传递的三种方式
Web version 3D visualization tool, 97 things programmers should know, AI frontier paper | information daily # 2022.07.01
能解决80%故障的排查思路
sql训练2
Websocket of Web real-time communication technology
Leetcode interview question 16.17 Continuous sequence
【每日一题】第一天
Paddlepaddle 28 build an automatic coder based on convolution
Detailed explanation of cjson usage
ESP32-C3入门教程 问题篇⑪——esp-tls: create_ssl_handle failed, tls_io_instance->options.trusted_certs null
UE4 用spline画正圆
Simulateur nightGod + application de test de capture de paquets Fiddler
StretchDIBits函数
Troubleshooting ideas that can solve 80% of faults
M2DGR:多源多场景 地面机器人SLAM数据集(ICRA 2022 )
饭卡 HDU2546
Unity learning shader notes [81] simple color adjustment post-processing (brightness, saturation, contrast)
IPtable port redirection masquerade[easy to understand]
在支付宝账户上买基金安全吗
如何清理废弃pv和其对应的文件夹
