cmlfxz /
flask-admin
this project is admin part,include login auth, post/site k8s project、env、cluster crud, learn how to release project based on istio service Mesh
28/100 healthLoading repository data…
cmlfxz / repository
this is k8s api project,k8s resources crud, front go to see flask-ui write by vue+iview
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
flask返回json数据
jsonify: 对数组直接可以使用 Content-Type: application/json
json.dumps() 返回类型:Content-Type: text/html; charset=utf-8
#方法1
#方法2
#方法3
#方法4 同时返回状态 #return make_response(jsonify(list_dict),201)
restful访问istio的api 在kubernetes的apigroup中有以下个与istio有关,分别是
authentication.istio.io, config.istio.io, networking.istio.io
其中config.istio.io为最主要的,istio流量控制相关的
routerule, egressrule, destinationpolicie
策略执行相关的
memquota,quota,rule,QuotaSpec,QuotaSpecBinding
监控与日志配置相关的
metric, logentrie
http调用相关的
httpapispecbinding, tracespan, httpapispec
node =>namesapce => (环境) => 项目 => 应用=> deployment/pod/service(volume,probe,secret,configmap,env,image,label,selector,ports,tolent,taints,status,stragedy) => ingress/gateway rbac=>storageclass=>job=>statefulset=>
ctrl+space 提示快捷键
apiVersion: networking.istio.io/v1alpha3 http://192.168.11.51:1900/apis/networking.istio.io/v1alpha3/gateways
2、把其他例子一并搞完(deployment,patch,watch)
3、模仿sparrow例子(写个蓝绿,灰度,(AB的例子))
4、正式写案例
// 配置服务健康检查使用的 type HealthData struct { // 检查类型 HealthType string // 检查端口 HealthPort string // http访问路径 HealthPath string // 服务启动预计时间 HealthInitialDelay string // 检查间隔 HealthInterval string // 失败阈值 HealthFailureThreshold string // 检查超时 HealthTimeout string // 通过命令检查 HealthCmd string }
jsontoyaml https://www.json2yaml.com/
1、先创建名称空间
问题 表单创建 标签和 service的标签对不上导致 一直503
1、创建集群 (集群名称,集群的配置文件config,云类型:私有云/公有云)
2、创建环境
3、创建harbor,仓库
4、创建项目,创建命名空间,选择注入(可以删除)
5、创建应用
集群 环境 所属项目 端口 容器镜像
6、应用灰度,回滚,
kubernetes.client.rest.ApiException: (409)
Reason: Conflict
HTTP response headers: HTTPHeaderDict({'Content-Type': 'application/json', 'Date': 'Tue, 30 Jun 2020 09:43:31 GMT', 'Content-Length': '202'})
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"namespaces "yw-dev" already exists",
"reason":"AlreadyExists","details":{"name":"yw-dev","kind":"namespaces"},"code":40
status:409 reason:Conflict body:{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"namespaces "yw-dev" already exists","reason":"AlreadyExists","details":{"name":"yw-dev","kind":"namespaces"},"code":409}
class ApiException(Exception):
def __init__(self, status=None, reason=None, http_resp=None):
if http_resp:
self.status = http_resp.status
self.reason = http_resp.reason
self.body = http_resp.data
self.headers = http_resp.getheaders()
else:
self.status = status
self.reason = reason
self.body = None
self.headers = None
跟命名空间无关: api版本 node namespaces storageclass pv
有关
deployment pod service configmap secret job cronjob daemonset stateful pvc gateway ingress vs dr
首页:
https://istio.io/latest/docs/concepts/traffic-management/
1、速率限制 2、负载均衡算法 3、熔断 https://istio.io/latest/docs/reference/config/networking/destination-rule/ # 熔断 trafficPolicy: connectionPool: tcp: maxConnections: 1 http: http1MaxPendingRequests: 1 maxRequestsPerConnection: 1 outlierDetection: # 开始拒绝连接的错误个数 consecutiveErrors: 1 interval: 1s baseEjectionTime: 3m maxEjectionPercent: 100 4、内外网 5、跨域(1 失败) 6、鉴权 7、请求超时 timeout: 7s 8、路由(vs,dr,redirect) 9、流量镜像 10、链路跟踪
1、添加agent 定义node label 2、checkout的证书ID 换成m-s里面定义的 credentialsId: 'gitee_account',
Selected from shared topics, language and repository description—not editorial ratings.
cmlfxz /
this project is admin part,include login auth, post/site k8s project、env、cluster crud, learn how to release project based on istio service Mesh
28/100 health