电脑如何设置终端设置代理_如何设置一个严肃的Kubernetes终端

电脑如何设置终端设置代理

by Chris Cooney

克里斯·库尼(Chris Cooney)

如何设置一个严肃的Kubernetes终端 (How to set up a serious Kubernetes terminal)

所有k8s书呆子需要的CLI工具 (All the CLI tools a growing k8s nerd needs)

Kubernetes comes pre-packaged with an outstanding CLI. For basic operations, it works wonderfully. Alas, when one needs to do something quickly, complexity increases.

Kubernetes预先打包了出色的CLI。 对于基本操作,它的运行非常出色。 las,当需要快速执行某项操作时,复杂性就会增加。

The Kubernetes community has built all sorts of web based tooling for monitoring your cluster — kube ops view, grafana etc. However, having a fully kitted terminal will rapidly speed up the time it takes to get to the root of an issue. It forms a fundamental part of your Swiss army knife.

Kubernetes社区已经构建了各种基于Web的工具来监视您的集群— kube ops view , grafana等。但是,拥有完整的终端设备将Swift加快解决问题根源的时间。 它构成了瑞士军刀的基本组成部分。

The following is a very short list of open source tools that I’ve applied to my OSX terminal. When used together, they allow me to skip around my kubernetes cluster, quickly troubleshoot issues, and monitor behaviour. I’ve cut out lots of small little utilities and stuck to the tools that I find myself using every day.

以下是我已应用于OSX终端的开源工具的简短列表。 一起使用时,它们使我可以跳过kubernetes集群,快速解决问题并监控行为。 我删除了许多小的实用程序,并坚持使用每天都能使用的工具。

在使用任何工具之前…… (Before any tools…)

Before you go after these tools, I’d strongly recommend installing zsh. It is an outstanding, open source wrapper around the standard OSX terminal. It is more feature rich and intuitive and the plugins you can install are fantastic. Some of these tools listed make the assumption you have ZSH installed.

在使用这些工具之前,我强烈建议您安装zsh 。 它是围绕标准OSX终端的出色的开源包装器。 它具有丰富的功能和直观的功能,您可以安装的插件很棒。 列出的其中一些工具假定您已安装ZSH。

9秒 (k9s)

I’m starting strong. K9s is the momma bear of CLI tools for kubernetes cluster. You can SSH straight into pods with a single key press, view logs, delete resources and more. It provides outstanding access for the most common operations you’ll be performing. This is a staple for any engineer using kubernetes.

我开始坚强。 K9s是用于Kubernetes集群的CLI工具的后盾。 您可以通过一次按键直接SSH到pod中,查看日志,删除资源等等。 它为您将执行的最常见操作提供了出色的访问权限。 对于使用kubernetes的任何工程师来说,这都是最重要的。

kubectx (kubectx)

But one thing that K9s doesn’t support is switching between various contexts in your kubernetes config. It is very rare that we’ll only have one single cluster. Switching between these is as simple as

但是K9s不支持的一件事是在kubernetes配置中的各种上下文之间切换。 我们只有一个集群是非常罕见的。 这些之间的切换非常简单

kubectl config use-context my-context

But with this, there are some prerequisites:

但是,这样做有一些先决条件:

  • You need to know the name of the cluster before you run.

    在运行之前,您需要知道集群的名称。
  • There is another, similar set-context command that could trip you up.

    还有另一个类似的set-context命令可以使您崩溃。

kubectx presents a simpler alternative to this. If you run kubectx on its own, it will list out all of the contexts in your .kube/config file. You can then provide the name of the context you’re interested in:

kubectx提供了一个更简单的替代方法。 如果您kubectx运行kubectx ,它将在.kube/config文件中列出所有上下文。 然后,您可以提供您感兴趣的上下文的名称:

kubectx my-context

No need to remember all the contexts, no need to manually check files and no possibility of getting the wrong command. Nice and simple. Combined with k9s, this offers a lot of navigability from your CLI with minimal key presses.

无需记住所有上下文,无需手动检查文件,也无需获取错误的命令。 漂亮又简单。 与k9s结合使用k9s ,只需最少的按键k9s ,就可以从CLI进行很多导航。

库本斯 (kubens)

Once you’re flitting around contexts, you may want to dig into a specific namespace. Once again, it’s very common to have more than a few namespaces in your cluster. Well, ahmetb (the gentleman who brought you kubectx) also put together kubens. It’s the same as kubectx, only for namespaces.

一旦在上下文中四处游荡,您可能想要挖掘特定的名称空间。 再一次,在集群中拥有多个命名空间是很常见的。 那么, ahmetb (谁把你的绅士kubectx )也放在一起kubens 。 它与kubectx相同,仅适用于名称空间。

kubens kube-system

Now all of your commands run against the kube-system namespace, by default. You can also run kubens without anything else to see a list of your namespaces.

现在,默认情况下,所有命令都针对kube-system名称空间运行。 您也可以不带其他任何内容运行kubens来查看名称空间列表。

kube-ps1 (kube-ps1)

So, you can switch between contexts and namespaces. But how do you know which one you’re currently aimed at? It’s a pain to keep checking. At the moment, to find out you’d need to run:

因此,您可以在上下文和名称空间之间切换。 但是,您怎么知道您当前针对的是哪一个呢? 不断检查很痛苦。 目前,要找出答案,您需要运行:

kubens
kubectx
kubectl <my-command>

To remove this, ps1 is a zsh plugin that will automatically show you your current context and namespace:

要删除此问题, ps1是一个zsh插件,它将自动向您显示您当前的上下文和名称空间:

Now you can see which namespace and context you’re pointing out without running a single command. It’s also highly configurable too — you can turn off namespace or context, if you’re only interested in one of them, or you can use kubeoff to disable the whole thing entirely.

现在,您无需运行任何命令即可查看要指出的名称空间和上下文。 它也是高度可配置的-如果您只对名称空间或上下文之一感兴趣,则可以将其关闭,也可以使用kubeoff完全禁用整个对象。

大力水手 (popeye)

Now, onto something a little different. popeye will run automatic scans of the resources in your repository and highlight clear, obvious problems. This is a very new tool and one that I have found very useful. If you’re looking for some spring cleaning to do in your cluster, starting with popeye will give you some clear indications of what needs to be fixed.

现在,到一些不同的地方。 popeye将对存储库中的资源进行自动扫描,并突出显示明显的明显问题。 这是一个非常新的工具,我发现它非常有用。 如果您要在集群中进行一些Spring大扫除,那么从popeye开始将为您提供一些需要修复的明确指示。

船尾 (Stern)

Ever used kubectl logs? Noticed you can only follow logs from one pod at one time? Well, worry no more! Stern is a tool that allows you to pull the logs from multiple pods, based on a very flexible query.

曾经使用过kubectl logs吗? 是否注意到您一次只能跟踪一个吊舱中的日志? 好吧,不用担心! Stern是一种工具,可让您基于非常灵活的查询从多个Pod中提取日志。

I’m talking regularly about kubernetes, DevOps and much more on my twitter account.

我经常在Twitter帐户上谈论kubernetes,DevOps以及更多内容。

翻译自: https://www.freecodecamp.org/news/how-to-set-up-a-serious-kubernetes-terminal-dd07cab51cd4/

电脑如何设置终端设置代理

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/391706.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

spring cloud(二)

1. Feign应用 Feign的作用&#xff1b;使用Feign实现consumer-demo代码中调用服务 导入启动器依赖&#xff1b;开启Feign功能&#xff1b;编写Feign客户端&#xff1b;编写一个处理器ConsumerFeignController&#xff0c;注入Feign客户端并使用&#xff1b;测试 <dependen…

c/c++编译器的安装

MinGW(Minimalist GNU For Windows)是个精简的Windows平台C/C、ADA及Fortran编译器&#xff0c;相比Cygwin而言&#xff0c;体积要小很多&#xff0c;使用较为方便。 MinGW最大的特点就是编译出来的可执行文件能够独立在Windows上运行。 MinGW的组成&#xff1a; 编译器(支持C、…

渗透工具

渗透工具 https://blog.csdn.net/Fly_hps/article/details/89306104 查询工具 https://blog.csdn.net/Fly_hps/article/details/89070552 转载于:https://www.cnblogs.com/liuYGoo/p/11347693.html

numpy 线性代数_数据科学家的线性代数—用NumPy解释

numpy 线性代数Machine learning and deep learning models are data-hungry. The performance of them is highly dependent on the amount of data. Thus, we tend to collect as much data as possible in order to build a robust and accurate model. Data is collected i…

spring 注解方式配置Bean

概要&#xff1a; 再classpath中扫描组件 组件扫描&#xff08;component scanning&#xff09;&#xff1a;Spring可以从classpath下自己主动扫描。侦測和实例化具有特定注解的组件特定组件包含&#xff1a; Component&#xff1a;基本注解。标示了一个受Spring管理的组件&…

主成分分析 独立成分分析_主成分分析概述

主成分分析 独立成分分析by Moshe Binieli由Moshe Binieli 主成分分析概述 (An overview of Principal Component Analysis) This article will explain you what Principal Component Analysis (PCA) is, why we need it and how we use it. I will try to make it as simple…

扩展方法略好于帮助方法

如果针对一个类型实例的代码片段经常被用到&#xff0c;我们可能会想到把之封装成帮助方法。如下是一段针对DateTime类型实例的一段代码&#xff1a;class Program{static void Main(string[] args){DateTime d new DateTime(2001,5,18);switch (d.DayOfWeek){case DayOfWeek.…

零元学Expression Blend 4 - Chapter 25 以Text相关功能就能简单做出具有设计感的登入画面...

原文:零元学Expression Blend 4 - Chapter 25 以Text相关功能就能简单做出具有设计感的登入画面本章将交大家如何运用Blend 4 内的Text相关功能做出有设计感的登入画面 让你五分钟就能快速做出一个登入画面 ? 本章将教大家如何运用Blend 4 内的Text相关功能做出有设计感的登入…

leetcode 395. 至少有 K 个重复字符的最长子串(滑动窗口)

给你一个字符串 s 和一个整数 k &#xff0c;请你找出 s 中的最长子串&#xff0c; 要求该子串中的每一字符出现次数都不少于 k 。返回这一子串的长度。 示例 1&#xff1a; 输入&#xff1a;s “aaabb”, k 3 输出&#xff1a;3 解释&#xff1a;最长子串为 “aaa” &…

冠状病毒时代的负责任数据可视化

First, a little bit about me: I’m a data science grad student. I have been writing for Medium for a little while now. I’m a scorpio. I like long walks on beaches. And writing for Medium made me realize the importance of taking personal responsibility ove…

集合_java集合框架

转载自http://blog.csdn.net/zsw101259/article/details/7570033 Java集合框架图 简化图&#xff1a; Java平台提供了一个全新的集合框架。“集合框架”主要由一组用来操作对象的接口组成。不同接口描述一组不同数据类型。 1、Java 2集合框架图 ①集合接口&#xff1a;6个…

显示随机键盘

显示随机键盘 1 <!DOCTYPE html>2 <html lang"zh-cn">3 <head>4 <meta charset"utf-8">5 <title>7-77 课堂演示</title>6 <link rel"stylesheet" type"text/css" href"style…

数据特征分析-统计分析

一、统计分析 统计分析是对定量数据进行统计描述&#xff0c;常从集中趋势和离中趋势两个方面分析。 集中趋势&#xff1a;指一组数据向某一中心靠拢的倾向&#xff0c;核心在于寻找数据的代表值或中心值-统计平均数&#xff08;算数平均数和位置平均数&#xff09; 算术平均数…

心学 禅宗_禅宗宣言,用于有效的代码审查

心学 禅宗by Jean-Charles Fabre通过让查尔斯法布尔(Jean-Charles Fabre) 禅宗宣言&#xff0c;用于有效的代码审查 (A zen manifesto for effective code reviews) When you are coding, interruptions really suck.当您编码时&#xff0c;中断确实很糟糕。 You are in the …

leetcode 896. 单调数列

如果数组是单调递增或单调递减的&#xff0c;那么它是单调的。 如果对于所有 i < j&#xff0c;A[i] < A[j]&#xff0c;那么数组 A 是单调递增的。 如果对于所有 i < j&#xff0c;A[i]> A[j]&#xff0c;那么数组 A 是单调递减的。 当给定的数组 A 是单调数组…

数据eda_银行数据EDA:逐步

数据edaThis banking data was retrieved from Kaggle and there will be a breakdown on how the dataset will be handled from EDA (Exploratory Data Analysis) to Machine Learning algorithms.该银行数据是从Kaggle检索的&#xff0c;将详细介绍如何将数据集从EDA(探索性…

结构型模式之组合

重新看组合/合成&#xff08;Composite&#xff09;模式&#xff0c;发现它并不像自己想象的那么简单&#xff0c;单纯从整体和部分关系的角度去理解还是不够的&#xff0c;并且还有一些通俗的模式讲解类的书&#xff0c;由于其举的例子太过“通俗”&#xff0c;以致让人理解产…

计算机网络原理笔记-三次握手

三次握手协议指的是在发送数据的准备阶段&#xff0c;服务器端和客户端之间需要进行三次交互&#xff1a; 第一次握手&#xff1a;客户端发送syn包(synj)到服务器&#xff0c;并进入SYN_SEND状态&#xff0c;等待服务器确认&#xff1b; 第二次握手&#xff1a;服务器收到syn包…

VB2010 的隐式续行(Implicit Line Continuation)

VB2010 的隐式续行&#xff08;Implicit Line Continuation&#xff09;许多情况下,您可以让 VB 后一行继续前一行的语句&#xff0c;而不必使用下划线&#xff08;_&#xff09;。下面列举出隐式续行语法的使用情形。1、逗号“&#xff0c;”之后PublicFunctionGetUsername(By…

flutter bloc_如何在Flutter中使用Streams,BLoC和SQLite

flutter blocRecently, I’ve been working with streams and BLoCs in Flutter to retrieve and display data from an SQLite database. Admittedly, it took me a very long time to make sense of them. With that said, I’d like to go over all this in hopes you’ll w…