当前位置: 首页 > 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/630596/

相关文章:

  • 用Runway Gen-3和Fish Audio,10分钟搞定你的第一条AI故事短片(附PR字幕技巧)
  • p5.js Web Editor终极指南:免费在线创作交互式动画的完整教程
  • ETCD Keeper终极指南:3分钟掌握可视化etcd管理工具
  • 数字化转型下的设备巡检:从痛点解析到高效落地实践
  • 弹幕格式转换工具深度解析:DanmakuFactory的架构设计与高级配置
  • Rust模块系统实战
  • DLSS Swapper终极指南:轻松管理游戏DLSS版本,提升画质性能
  • [笔记]Godot Shader合集
  • 项目介绍 MATLAB实现基于卷积神经网络(CNN)进行多变量单步光伏功率预测的详细项目实例(含模型描述及部分示例代码)专栏近期有大量优惠 还请多多点一下关注 加油 谢谢 你的鼓励是我前行的动力 谢谢
  • CompressO终极压缩神器:免费开源的一键瘦身工具,释放95%存储空间
  • 实用指南:将旧Android手机改造为3D打印控制中心
  • 冷启动不是“等一下”的问题:20年分布式系统老兵警告——未做Kernel-Level Warmup的大模型服务,正在 silently 丢失37%首屏转化率
  • 2026除水垢软化水设备哪家好:EDI超纯水设备/一体式软化水设备/中央空调软化水设备/全自动软化水设备/养殖场软化水设备/选择指南 - 优质品牌商家
  • 仅剩72小时!奇点大会NER赛道TOP3方案完整技术栈拆解:从Prompt Schema设计到GPU显存优化的11个硬核细节
  • 只狼mod
  • 免费查AI率平台横评:知网、维普、万方检测结果到底差多少
  • QNX系统资源监控实战:高效查看CPU与内存使用情况
  • Pharma Agent:从文档 QA 到智能监管合规助手
  • 1、IntelliJ IDEA 之简介
  • GoCodingInMyWay钨
  • Serverless+WebAssembly:构建下一代高性能后端接口实战
  • Llama-3.2V-11B-cot模型推理加速:算法优化与GPU显存管理技巧
  • UniApp分包避坑指南:pages.json配置常见错误与各平台大小限制详解
  • 项目介绍 MATLAB实现基于核主成分分析(KPCA)进行故障诊断分类预测测的详细项目实例(含模型描述及部分示例代码)专栏近期有大量优惠 还请多多点一下关注 加油 谢谢 你的鼓励是我前行的动力 谢谢支
  • 工位旋转工作台PLC控制系统设计(西门子S7-200与Smart程序通用)
  • 从Transformer到多模态:拆解行为识别模型进化的底层逻辑(附实战数据集选择指南)
  • 如何快速将B站缓存视频从m4s转换为MP4:终极免费转换指南
  • 贝叶斯vs频率派:医疗诊断案例告诉你为什么选择贝叶斯推理
  • 大模型Prompt工程:从基础原理到实战应用
  • 别再吹牛了,% Vibe Coding 存在无法自洽的逻辑漏洞!烫