当前位置: 首页 > news >正文

OPUS编解码器在audio DSP上的移植和应用诙

前言

在使用 kubectl get $KIND -o yaml 查看 k8s 资源时,输出结果中包含大量由集群自动生成的元数据(如 managedFields、resourceVersion、uid 等)。这些信息在实际复用 yaml 清单时需要手动清理,增加了额外的工作量。

使用 kubectl-neat 插件,可以自动移除这些由集群生成的冗余字段,仅保留有意义的内容,使 yaml 更加简洁,方便复用。

安装

插件方式安装

kubectl krew install neat

## 作为 kubectl 插件安装,使用方式为:

kubectl neat

二进制方式安装

## 版本选择:

## https://github.com/itaysk/kubectl-neat/releases

## 当前环境为 ubuntu 2404 LTS

wget https://github.com/itaysk/kubectl-neat/releases/download/v2.0.4/kubectl-neat_linux_amd64.tar.gz

tar xf kubectl-neat_linux_amd64.tar.gz

mv ./kubectl-neat /usr/local/bin/

## 创建别名(这里看个人习惯)

vim /root/.bashrc

alias kneat='kubectl-neat'

使用

本次使用二进制方式部署,实际上参数是相同的,没区别

root@network-demo:~# kubectl-neat help

Usage:

kubectl-neat [flags]

kubectl-neat [command]

## 示例是通过 kubectl plugin 方式安装,使用二进制安装改成 kubectl-neat 就好

Examples:

kubectl get pod mypod -o yaml | kubectl neat

kubectl get pod mypod -oyaml | kubectl neat -o json

kubectl neat -f - <./my-pod.json

kubectl neat -f ./my-pod.json

kubectl neat -f ./my-pod.json --output yaml

Available Commands:

## 自动补全命令用的

completion Generate the autocompletion script for the specified shell

get

help Help about any command

version Print kubectl-neat version

Flags:

-f, --file string file path to neat, or - to read from stdin (default "-")

-h, --help help for kubectl-neat

-o, --output string output format: yaml or json (default "yaml")

命令补全

简单来说就是按两下 tab 后自动补充没拼完的参数

?? 注:其实没啥用...他只能补全命令本身的参数,并不能补全 k8s 相关信息

root@network-demo:~# kubectl-neat completion --help

Generate the autocompletion script for kubectl-neat for the specified shell.

See each sub-command's help for details on how to use the generated script.

Usage:

kubectl-neat completion [command]

Available Commands:

bash Generate the autocompletion script for bash

fish Generate the autocompletion script for fish

powershell Generate the autocompletion script for powershell

zsh Generate the autocompletion script for zsh

Flags:

-h, --help help for completion

Global Flags:

-o, --output string output format: yaml or json (default "yaml")

## 当前环境使用 bash

root@network-demo:~# hostnamectl

Static hostname: network-demo

Icon name: computer-vm

Chassis: vm

Virtualization: kvm

Operating System: Ubuntu 24.04.3 LTS

Kernel: Linux 6.8.0-88-generic

Architecture: x86-64

## 添加命令补全

echo "source <(kneat completion bash)" >> ~/.bashrc && source ~/.bashrc

## 查看效果

## 上面说没啥用的地方就在这...实际上能用的参数只有 get(kubectl-neat 自己的参数)

## 当你补全 get 后就会发现他无法识别 k8s 资源

root@network-demo:~# kubectl-neat

completion (Generate the autocompletion script for the specified shell) help (Help about any command)

get version (Print kubectl-neat version)

使用方式

## 这里我直接将 kubectl get -o yaml 与 kubectl-neat get -o yaml 输出对比

kubectl-neat get -- pods -n deepflow deepflow-server-fc484c85-p67gl -o yaml > deepflow-kneat.yaml

kubectl get pods -n deepflow deepflow-server-fc484c85-p67gl -o yaml > deepflow-kubectl.yaml

## 通过 icdiff 输出两个文件的对比结果,这里为了方便大家看,只把删除的内容放上来了

root@network-demo:~# icdiff deepflow-kubectl.yaml deepflow-kneat.yaml

creationTimestamp: "2026-01-23T02:24:57Z"

generateName: deepflow-server-fc484c85-

generation: 1

ownerReferences:

- apiVersion: apps/v1

blockOwnerDeletion: true

controller: true

kind: ReplicaSet

name: deepflow-server-fc484c85

uid: 528ab77f-67ba-4099-8771-bfe06ca9ce2f

resourceVersion: "4864722"

uid: 0d5ff97b-9c48-4abf-be8b-d2b76f7a14d2

nodeAffinity: {}

apiVersion: v1

apiVersion: v1

apiVersion: v1

apiVersion: v1

apiVersion: v1

scheme: HTTP

successThreshold: 1

timeoutSeconds: 1

protocol: TCP

protocol: TCP

protocol: TCP

protocol: TCP

scheme: HTTP

periodSeconds: 10

successThreshold: 1

timeoutSeconds: 1

resources: {}

securityContext: {}

terminationMessagePath: /dev/termination-log

terminationMessagePolicy: File

dnsConfig: {}

dnsPolicy: ClusterFirst

enableServiceLinks: true

nodeName: network-demo

restartPolicy: Always

schedulerName: default-scheduler

securityContext: {}

serviceAccount: deepflow-server

terminationGracePeriodSeconds: 30

defaultMode: 420

defaultMode: 420

apiVersion: v1

status:

## 下面是所有 status 内容...我驼谙粟

http://www.jsqmd.com/news/631065/

相关文章:

  • 【2026奇点大会核心预判】:大模型文本生成的5大技术拐点与企业落地生死线
  • 从开始配置漏洞环境到漏洞复现流程
  • 网钛CMS:经典PHP内容管理系统的源码解析与博客搭建指南
  • GoCodingInMyWay俜
  • 最强麒麟芯+自研风冷 华为Mate80 Pro MAX 风驰版全面评测:涡轮散热封神 性能稳到骨子里
  • 扩散模型对抗样本经典baselines特
  • 别再死记硬背公式了!用Excel和一张散点图,5分钟搞懂最小二乘法在干啥
  • 2026届毕业生推荐的五大AI论文方案推荐
  • GB/T28181设备接入WVP平台保姆级教程:从海康到大华的配置避坑指南
  • gitru:一个由 Rust 打造的零依赖 Git 提交信息校验工具挡
  • Nginx 学习总结泛
  • 《物联网识别技术》期末速成复习笔记
  • MyBatis中CONCAT函数的5个实战技巧:从模糊查询到动态SQL拼接
  • 统计学实战指南——指数在商业决策中的应用
  • 实时行情系统设计:从协议选择到高可用架构,再到数据源选型拓
  • 别再乱删DLL了!深入解析PyInstaller打包Pyside2的依赖树与正确瘦身姿势
  • 大模型RAG流水线混沌演练实录:向Embedding服务注入17ms延迟后,召回率断崖式下跌43%!
  • 深度解析DXVK:Linux游戏生态的Vulkan翻译层革命
  • Talebook个人书库系统完整指南:如何快速搭建专属在线图书馆
  • CSS如何利用Flex实现两层结构的嵌套布局_掌握父子容器的Flex属性继承
  • 【机器视觉】Halcon 授权密钥获取、更新与版本适配全攻略
  • 从ChatGPT到文心一言:5个国内大模型产品实测对比(附使用指南)
  • AI 时代:祛魅、适应与重新定义仍
  • Google 迎来「DeepSeek 时刻」:TurboQuant算法实现bit无损、×加速、×压缩、零预处理背
  • 雀魂AI助手Akagi:从麻将新手到高手的终极完整指南
  • ViGEmBus虚拟游戏控制器驱动:终极解决方案与完整使用教程
  • Qwen All-in-One完整教程:从原理到代码实现多任务AI引擎
  • 网站反爬机制的技术架构与演进
  • ISE Timing Report 深度解析与优化实践
  • 2025届必备的五大降AI率神器解析与推荐