上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 164 下一页

2021年7月16日

摘要: container/heap 本文是 Go 标准库中 container/heap 包文档的翻译, 原文地址为: https://golang.org/pkg/container/heap/ 概述 包 heap 为所有实现了 heap.Interface 的类型提供堆操作。 一个堆即是一棵树, 这棵 阅读全文
posted @ 2021-07-16 17:21 tycoon3 阅读(1344) 评论(0) 推荐(0)
摘要: package main import ( "fmt" ) func main() { mapInterface := make(map[interface{}]interface{}) mapString := make(map[string]string) mapInterface["k1"] 阅读全文
posted @ 2021-07-16 17:12 tycoon3 阅读(180) 评论(0) 推荐(0)
摘要: 数组和slice的区别 声明数组时,方括号内写明了数组的长度或者...,声明slice时候,方括号内为空 作为函数参数时,数组传递的是数组的副本,而slice传递的是指针。 数组与切片数组是具有相同唯一类型的一组已编号且长度固定的数据项序列。数组长度最大为2Gb,它是值类型。切片是对数组一个连续片段 阅读全文
posted @ 2021-07-16 16:31 tycoon3 阅读(123) 评论(0) 推荐(0)
摘要: 1、interface 是一种类型 type I interface { Get() int } 首先 interface 是一种类型,从它的定义可以看出来用了 type 关键字,更准确的说 interface 是一种具有一组方法的类型,这些方法定义了 interface 的行为。 go 允许不带任 阅读全文
posted @ 2021-07-16 15:30 tycoon3 阅读(428) 评论(0) 推荐(0)
摘要: root@ubuntu:~/tenant# kubectl get networkPolicy --output yaml apiVersion: v1 items: - apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: c 阅读全文
posted @ 2021-07-16 14:45 tycoon3 阅读(69) 评论(0) 推荐(0)

2021年7月15日

摘要: If you are debugging IPTables, it is handy to be able to trace the packets while it traverses the various chains. I was trying to find out why port fo 阅读全文
posted @ 2021-07-15 17:40 tycoon3 阅读(795) 评论(0) 推荐(0)
摘要: Network Policy Enforcement While network policy designs are out of scope for this reference architecture, it is a core feature of Calico and thus is m 阅读全文
posted @ 2021-07-15 14:30 tycoon3 阅读(152) 评论(0) 推荐(0)

2021年7月14日

摘要: Kubernetes的一个重要特性就是要把不同node节点的pod(container)连接起来,无视物理节点的限制。但是在某些应用环境中,比如公有云,不同租户的pod不应该互通,这个时候就需要网络隔离。幸好,Kubernetes提供了NetworkPolicy,支持按Namespace级别的网络隔 阅读全文
posted @ 2021-07-14 16:47 tycoon3 阅读(1319) 评论(0) 推荐(0)
摘要: Kubernetes的原生多租户解决方案 Kubernetes提供一系列原生Kubernetes API与资源,用于帮助在单一集群内建立起多租户体系。下面,我们将介绍如何在计算、网络以及存储方面实现多租户资源隔离。 计算隔离 Kubernetes说明文档中将命名空间定义为“一种在多个用户之间分配集群 阅读全文
posted @ 2021-07-14 16:44 tycoon3 阅读(1790) 评论(0) 推荐(0)
摘要: 1 要解决的问题 集群分配给多个用户使用时,需要使用配额以限制用户的资源使用,包括 CPU 核数、内存大小、GPU 卡数等,以防止资源被某些用户耗尽,造成不公平的资源分配。 大多数情况下,集群原生的 ResourceQuota 机制可以很好地解决问题。但随着集群规模扩大,以及任务类型的增多,我们对配 阅读全文
posted @ 2021-07-14 16:39 tycoon3 阅读(128) 评论(0) 推荐(0)
上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 164 下一页

导航