【模块一】kubernetes容器编排进阶实战之资源管理核心概念

kubernetes 资源管理核心概念

k8s的设计理念—分层架构

 

CRI-container runtime interface-容器运行接口
CNI-container network interface-容器网络接口
CSI-container storage interface-容器存储接口 

k8s的设计理念—API设计原则

 

https://www.kubernetes.org.cn/kubernetes%e8%ae%be%e8%ae%a1%e7%90%86%e5%bf%b5所有API应该是声明式的。
API对象是彼此互补而且可组合的。
高层API以操作意图为基础设计。
低层API根据高层API的控制需要设计。
尽量避免简单封装,不要有在外部API无法显式知道的内部隐藏的机制。API操作复杂度与对象数量成正比。
API对象状态不能依赖于网络连接状态。
尽量避免让操作机制依赖于全局状态,因为在分布式系统中要保证全局状态的同步是非常困难的。

kubernetes API简介

 

内置API: 部署好kubernetes集群后自带的 API接口.

自定义资源:CRD(Custom Resource Definition),部署kubernetes之后通过安装其 它组件等方式扩展出来的API。

kubernetes 内置API及资源对象简介

 

# curl --cacert /etc/kubernetes/ssl/ca.pem -H "Authorization: Bearer TOKEN" https://127.0.0.1:6443[root@k8s-master1 2.dashboard-v2.7.0]#kubectl get secrets -A |grep admin
kubernetes-dashboard   dashboard-admin-user   kubernetes.io/service-account-token   3      4m27s
kuboard                kuboard-admin-token    kubernetes.io/service-account-token   3      8d
#获取token
[root@k8s-master1 2.dashboard-v2.7.0]#kubectl describe secrets  -n kubernetes-dashboard dashboard-admin-user curl --cacert /etc/kubernetes/ssl/ca.pem -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6InFDU2NVUThyQ3RPREkySExNdTN0dktnRWpkbnhYcXp5b091NmE2TEZTRlEifQ.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJrdWJlcm5ldGVzLWRhc2hib2FyZCIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJkYXNoYm9hcmQtYWRtaW4tdXNlciIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50Lm5hbWUiOiJhZG1pbi11c2VyIiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQudWlkIjoiM2UwYmY2MmQtMDk3YS00MmU4LWE5NjItZTNmMTAxMGFlM2NjIiwic3ViIjoic3lzdGVtOnNlcnZpY2VhY2NvdW50Omt1YmVybmV0ZXMtZGFzaGJvYXJkOmFkbWluLXVzZXIifQ.LVc_o1AebQHNGveuCQMSsQXNWwDXEyzg-HyLZccLm7IFENETN7PqnR1l6PC0WszWo0ekVfwwqkIpWl0sXLqcgqTGqv-FzIGHS7okwpskdReQOBfzPPPo73O_CLdWMLgo9iISVB-WK7YbMZzrCwZ8aosHTXjI4_5XhlZtbI2UZu0Fiuwxkq5DMwkYQ-_x1vFV_zwyN8u01MdUkpsRo_8CA-b72dAOVmABEO3PxSHVoekVvVkvXLf7rZsMJdiqn1qGFAQL3-xTlivg2bfBPTeHkx7YExn12sre4omRFWkMEGl6Yv9OGenRQgakTImJWjSZhmJgm6bX9XED3LT0kJ9rLA " https://10.0.0.188:6443[root@k8s-master1 2.dashboard-v2.7.0]#curl --cacert /etc/kubernetes/ssl/ca.pem -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6InFDU2NVUThyQ3RPREkySExNdTN0dktnRWpkbnhYcXp5b091NmE2TEZTRlEifQ.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJrdWJlcm5ldGVzLWRhc2hib2FyZCIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJkYXNoYm9hcmQtYWRtaW4tdXNlciIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50Lm5hbWUiOiJhZG1pbi11c2VyIiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9zZXJ2aWNlLWFjY291bnQudWlkIjoiM2UwYmY2MmQtMDk3YS00MmU4LWE5NjItZTNmMTAxMGFlM2NjIiwic3ViIjoic3lzdGVtOnNlcnZpY2VhY2NvdW50Omt1YmVybmV0ZXMtZGFzaGJvYXJkOmFkbWluLXVzZXIifQ.LVc_o1AebQHNGveuCQMSsQXNWwDXEyzg-HyLZccLm7IFENETN7PqnR1l6PC0WszWo0ekVfwwqkIpWl0sXLqcgqTGqv-FzIGHS7okwpskdReQOBfzPPPo73O_CLdWMLgo9iISVB-WK7YbMZzrCwZ8aosHTXjI4_5XhlZtbI2UZu0Fiuwxkq5DMwkYQ-_x1vFV_zwyN8u01MdUkpsRo_8CA-b72dAOVmABEO3PxSHVoekVvVkvXLf7rZsMJdiqn1qGFAQL3-xTlivg2bfBPTeHkx7YExn12sre4omRFWkMEGl6Yv9OGenRQgakTImJWjSZhmJgm6bX9XED3LT0kJ9rLA " https://10.0.0.188:6443
{"paths": ["/.well-known/openid-configuration","/api","/api/v1","/apis","/apis/","/apis/admissionregistration.k8s.io","/apis/admissionregistration.k8s.io/v1","/apis/apiextensions.k8s.io","/apis/apiextensions.k8s.io/v1","/apis/apiregistration.k8s.io","/apis/apiregistration.k8s.io/v1","/apis/apps","/apis/apps/v1","/apis/authentication.k8s.io","/apis/authentication.k8s.io/v1","/apis/authorization.k8s.io","/apis/authorization.k8s.io/v1","/apis/autoscaling","/apis/autoscaling/v1","/apis/autoscaling/v2","/apis/batch","/apis/batch/v1","/apis/certificates.k8s.io","/apis/certificates.k8s.io/v1","/apis/coordination.k8s.io","/apis/coordination.k8s.io/v1","/apis/discovery.k8s.io","/apis/discovery.k8s.io/v1","/apis/events.k8s.io","/apis/events.k8s.io/v1","/apis/flowcontrol.apiserver.k8s.io","/apis/flowcontrol.apiserver.k8s.io/v1beta2","/apis/flowcontrol.apiserver.k8s.io/v1beta3","/apis/networking.k8s.io","/apis/networking.k8s.io/v1","/apis/node.k8s.io","/apis/node.k8s.io/v1","/apis/policy","/apis/policy/v1","/apis/rbac.authorization.k8s.io","/apis/rbac.authorization.k8s.io/v1","/apis/scheduling.k8s.io","/apis/scheduling.k8s.io/v1","/apis/storage.k8s.io","/apis/storage.k8s.io/v1","/apis/storage.k8s.io/v1beta1","/healthz","/healthz/autoregister-completion","/healthz/etcd","/healthz/log","/healthz/ping","/healthz/poststarthook/aggregator-reload-proxy-client-cert","/healthz/poststarthook/apiservice-openapi-controller","/healthz/poststarthook/apiservice-openapiv3-controller","/healthz/poststarthook/apiservice-registration-controller","/healthz/poststarthook/apiservice-status-available-controller","/healthz/poststarthook/bootstrap-controller","/healthz/poststarthook/crd-informer-synced","/healthz/poststarthook/generic-apiserver-start-informers","/healthz/poststarthook/kube-apiserver-autoregistration","/healthz/poststarthook/priority-and-fairness-config-consumer","/healthz/poststarthook/priority-and-fairness-config-producer","/healthz/poststarthook/priority-and-fairness-filter","/healthz/poststarthook/rbac/bootstrap-roles","/healthz/poststarthook/scheduling/bootstrap-system-priority-classes","/healthz/poststarthook/start-apiextensions-controllers","/healthz/poststarthook/start-apiextensions-informers","/healthz/poststarthook/start-cluster-authentication-info-controller","/healthz/poststarthook/start-kube-aggregator-informers","/healthz/poststarthook/start-kube-apiserver-admission-initializer","/healthz/poststarthook/start-kube-apiserver-identity-lease-controller","/healthz/poststarthook/start-kube-apiserver-identity-lease-garbage-collector","/healthz/poststarthook/start-legacy-token-tracking-controller","/healthz/poststarthook/storage-object-count-tracker-hook","/livez","/livez/autoregister-completion","/livez/etcd","/livez/log","/livez/ping","/livez/poststarthook/aggregator-reload-proxy-client-cert","/livez/poststarthook/apiservice-openapi-controller","/livez/poststarthook/apiservice-openapiv3-controller","/livez/poststarthook/apiservice-registration-controller","/livez/poststarthook/apiservice-status-available-controller","/livez/poststarthook/bootstrap-controller","/livez/poststarthook/crd-informer-synced","/livez/poststarthook/generic-apiserver-start-informers","/livez/poststarthook/kube-apiserver-autoregistration","/livez/poststarthook/priority-and-fairness-config-consumer","/livez/poststarthook/priority-and-fairness-config-producer","/livez/poststarthook/priority-and-fairness-filter","/livez/poststarthook/rbac/bootstrap-roles","/livez/poststarthook/scheduling/bootstrap-system-priority-classes","/livez/poststarthook/start-apiextensions-controllers","/livez/poststarthook/start-apiextensions-informers","/livez/poststarthook/start-cluster-authentication-info-controller","/livez/poststarthook/start-kube-aggregator-informers","/livez/poststarthook/start-kube-apiserver-admission-initializer","/livez/poststarthook/start-kube-apiserver-identity-lease-controller","/livez/poststarthook/start-kube-apiserver-identity-lease-garbage-collector","/livez/poststarthook/start-legacy-token-tracking-controller","/livez/poststarthook/storage-object-count-tracker-hook","/logs","/metrics","/openapi/v2","/openapi/v3","/openapi/v3/","/openid/v1/jwks","/readyz","/readyz/autoregister-completion","/readyz/etcd","/readyz/etcd-readiness","/readyz/informer-sync","/readyz/log","/readyz/ping","/readyz/poststarthook/aggregator-reload-proxy-client-cert","/readyz/poststarthook/apiservice-openapi-controller","/readyz/poststarthook/apiservice-openapiv3-controller","/readyz/poststarthook/apiservice-registration-controller","/readyz/poststarthook/apiservice-status-available-controller","/readyz/poststarthook/bootstrap-controller","/readyz/poststarthook/crd-informer-synced","/readyz/poststarthook/generic-apiserver-start-informers","/readyz/poststarthook/kube-apiserver-autoregistration","/readyz/poststarthook/priority-and-fairness-config-consumer","/readyz/poststarthook/priority-and-fairness-config-producer","/readyz/poststarthook/priority-and-fairness-filter","/readyz/poststarthook/rbac/bootstrap-roles","/readyz/poststarthook/scheduling/bootstrap-system-priority-classes","/readyz/poststarthook/start-apiextensions-controllers","/readyz/poststarthook/start-apiextensions-informers","/readyz/poststarthook/start-cluster-authentication-info-controller","/readyz/poststarthook/start-kube-aggregator-informers","/readyz/poststarthook/start-kube-apiserver-admission-initializer","/readyz/poststarthook/start-kube-apiserver-identity-lease-controller","/readyz/poststarthook/start-kube-apiserver-identity-lease-garbage-collector","/readyz/poststarthook/start-legacy-token-tracking-controller","/readyz/poststarthook/storage-object-count-tracker-hook","/readyz/shutdown","/version"][root@k8s-master1 ~]#curl --cacert /etc/kubernetes/ssl/ca.pem -H "Authorization: Bearer <YOUR_ACTUAL_TOKEN> " https://10.0.0.188:6443/api/v1/nodes/10.0.0.123[root@k8s-master1 ~]#curl --cacert /etc/kubernetes/ssl/ca.pem -H "Authorization: Bearer <YOUR_ACTUAL_TOKEN> " https://10.0.0.188:6443/metrics

kubernetes内置资源对象简介

kubernetes 资源对象操作命令

 

 

 

 

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

如若内容造成侵权/违法违规/事实不符,请联系一条长河网进行投诉反馈,一经查实,立即删除!

相关文章

DBeaver中PostgreSQL数据库显示不全的解决方法

本文介绍在DBeaver中&#xff0c;连接PostgreSQL后&#xff0c;数据库显示不全的解决方法。 最近&#xff0c;在DBeaver中连接了本地的PostgreSQL数据库。但是连接后打开这个数据库时发现&#xff0c;其所显示的Databases不全。如下图所示&#xff0c;Databases只显示了一个pos…

ElasticSearch学习笔记二:使用Java客户端

一、前言 在上一篇文章中&#xff0c;我们对ES有了最基本的认识&#xff0c;本着实用为主的原则&#xff0c;我们先不学很深的东西&#xff0c;今天打算先学习一下ES的Java客户端如何使用。 二、创建项目 1、普通Maven项目 1、创建一个Maven项目 2、Pom文件 <dependenc…

MySQL8 安装教程

一、从官网下载mysql-8.0.18-winx64.zip安装文件&#xff08; 从 https://dev.mysql.com/downloads/file/?id484900 下载zip版本安装包 mysql-8.0.18-winx64.zip 解压到本地磁盘中&#xff0c;例如解压到&#xff1a;D盘根目录&#xff0c;并改名为MySQL mysql-8.0.34-winx6…

如何将LiDAR坐标系下的3D点投影到相机2D图像上

将激光雷达点云投影到相机图像上做数据层的前融合&#xff0c;或者把激光雷达坐标系下标注的物体点云的3d bbox投影到相机图像上画出来&#xff0c;都需要做点云3D点坐标到图像像素坐标的转换计算&#xff0c;也就是LiDAR 3D坐标转像素坐标。 看了网上一些文章都存在有错误或者…

【Pikachu】XML外部实体注入实战

若天下不定&#xff0c;吾往&#xff1b;若世道不平&#xff0c;不回&#xff01; 1.XXE漏洞实战 首先写入一个合法的xml文档 <?xml version "1.0"?> <!DOCTYPE gfzq [<!ENTITY gfzq "gfzq"> ]> <name>&gfzq;</name&…

游戏引擎学习第13天

视频参考:https://www.bilibili.com/video/BV1QQUaYMEEz/ 改代码的地方尽量一张图说清楚吧,懒得浪费时间 game.h #pragma once #include <cmath> #include <cstdint> #include <malloc.h>#define internal static // 用于定义内翻译单元内部函数 #…

(一)Ubuntu20.04服务器端部署Stable-Diffusion-webui AI绘画环境

一、说明 cup型号&#xff1a; Intel(R) Celeron(R) CPU G1610 2.60GHz 内存大小&#xff1a; 7.5Gi 356Mi 4.6Gi 1.0Mi 2.6Gi 6.8Gi Swap: 4.0Gi 0B 4.0Gi 显卡型号&#xff1a;NVIDIA P104-100 注意&#xff1a…

Python Tornado框架教程:高性能Web框架的全面解析

Python Tornado框架教程&#xff1a;高性能Web框架的全面解析 引言 在现代Web开发中&#xff0c;选择合适的框架至关重要。Python的Tornado框架因其高性能和非阻塞I/O特性而备受青睐。它特别适合处理大量并发连接的应用&#xff0c;比如聊天应用、实时数据处理和WebSocket服务…

ubuntu20.04安装anaconda

在anaconda的官网&#xff08;Anaconda | The Operating System for AI&#xff09;或者清华镜像源网站&#xff08;Index of /anaconda/archive/ | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror&#xff09;中下载对应的anaconda版本 可以在网页直接下载或者通过命…

平衡二叉搜索树之 红黑 树的模拟实现【C++】

文章目录 红黑树的简单介绍定义红黑树的特性红黑树的应用 全部的实现代码放在了文章末尾准备工作包含头文件类的成员变量和红黑树节点的定义 构造函数和拷贝构造swap和赋值运算符重载析构函数findinsert【重要】第一步&#xff1a;按照二叉搜索树的方式插入新节点第二步&#x…

【设计模式】行为型模式(四):备忘录模式、中介者模式

行为型模式&#xff08;四&#xff09;&#xff1a;备忘录模式、中介者模式 7.备忘录模式&#xff08;Memento&#xff09;7.1 通俗易懂的解释7.2 具体步骤7.3 代码示例7.3.1 定义发起人7.3.2 定义备忘录7.3.3 定义管理者7.3.4 客户端7.3.5 输出 7.4 总结 8.中介者模式&#xf…

Thinkpad E15 在linux下升级 bios

安装xubuntu 24.04后&#xff0c;发现键盘的Fn按键全都无法使用&#xff0c;在Windows环境下是正常的&#xff0c;按说是驱动的问题&#xff0c;网上也有说可以通过升级BIOS解决&#xff0c;所以打算升级看看&#xff0c;升级有风险。 参考&#xff1a; https://blog.stigok.c…

Java学习Day61:薄纱王灵官!(Nginx review)

1.Nginx是什么 Nginx是一款轻量级、高性能&#xff0c;并发性好的HTTP和反向代理服务器 2.功能 2.1反向代理 正向代理是指客户端向代理服务器发送请求&#xff0c;代理服务器代表客户端去访问目标服务器。简单来说&#xff0c;正向代理是客户端的代理&#xff0c;客户端通过…

MATLAB用到的矩阵基础知识(矩阵的乘和矩阵的逆)

1. 矩阵乘法 方法: 设第一个矩阵为 A A A,第二个矩阵为 B B B,则 A A A的第一行乘 B B B的第一列,先想乘再相加,作为目标矩阵的一个元素。 前提条件: 所以我们可以看到矩阵相乘的前提条件:第一个矩阵的列数等于第二个矩阵的行数。否则,我们就无法进行行和列的相乘。 最…

Oracle OCP认证考试考点详解082系列22

题记&#xff1a; 本系列主要讲解Oracle OCP认证考试考点&#xff08;题目&#xff09;&#xff0c;适用于19C/21C,跟着学OCP考试必过。 105. 第105题&#xff1a; 题目 解析及答案&#xff1a; 题目翻译&#xff1a; 关于Oracle数据库中的事务请选择两个正确的陈述&#xf…

【ict基础软件赛道】真题-50%openGauss

题目取自赛前测试链接 OpenGauss安装前使用哪个工具检查环境是否符合安装哪个功能不是gs_guc工具提供的opengauss数据库逻辑复制的特点描述正确的是opengauss的全密态数据库等值查询能力描述正确的是哪个不属于ssh客户端工具opengauss三权分立说法正确的是opengauss wdr snapsh…

MDK5(Keil5)工具设置及技巧

设置&#xff1a; 1点击扳手&#xff08;设置&#xff09; 2文字设置为GB2312简体 3勾选显示空格 4按一下TAB键移动4个空格 修改keil中数字大小及颜色&#xff08;增加对比&#xff09; 勾选全部 1提示结构体 2提示函数参数 3打上几个英文符号后开始提示 4TAB作为填充字符 5打开…

4G模组Air780E对json数据处理的基本方法~

4G模组Air780E在数据传输和处理中扮演着越来越重要的角色。在实际应用中&#xff0c;JSON作为一种轻量级的数据交换格式&#xff0c;被广泛应用于网络数据传输和存储。本文将详细介绍4G模组Air780E对JSON数据处理的基本方法&#xff0c;以帮助开发者更好地利用这一模组进行数据…

学习使用LVGL,依赖官方网址

LVGL Basics — LVGL documentation LVGL基础知识 LVGL是一个开源的图形库&#xff0c;提供创建嵌入式GUI的一切 LVGL数据流 您为每个物理显示面板 创建一个显示器 (lv_display) &#xff0c;在其上创建屏幕小部件&#xff0c;将小部件添加到这些屏幕上。要处理触摸、鼠标、…