logo
publist
写文章

简介

该用户还未填写简介

擅长的技术栈

可提供的服务

暂无可提供的服务

Spring Cache 配置多级缓存

两级缓存: 本地缓存使用Caffeine, 远程缓存使用redis. 也可以只使用本地缓存或者只使用redis缓存基于SpringBoot 2.4.0, 依赖如下:<dependency><groupId>com.github.ben-manes.caffeine</groupId><artifactId>caffeine</artifactI

#spring boot#spring#缓存 +2
k3s执行helm命令报错:Error: Kubernetes cluster unreachable: Get “http://localhost:8080/version?timeout=32s“

报错信息:Error: Kubernetes cluster unreachable: Get "http://localhost:8080/version?timeout=32s": dial tcp [::1]:8080: connect: connection refused报错原因: helm v3版本不再需要Tiller,而是直接访问ApiServer来与k8s交互,通过环境变量KUBE

k8s: 配置ingress的会话亲和

Ingress会话亲和,又称会话保持,粘性会话,指同一客户端的请求在一定时间内会被ingress路由到相同的pod处理. 本文控制器使用的是ingress-nginxingress默认的负载均衡策略是轮询, 验证如下使用浏览器连续访问9次ingress查看ingress日志, 可看到9次请求被轮询负载到不同pod处理配置会话亲和修改ingress, 增加如下内容nginx.ingress.kube

#kubernetes
k3s执行helm命令报错:Error: Kubernetes cluster unreachable: Get “http://localhost:8080/version?timeout=32s“

报错信息:Error: Kubernetes cluster unreachable: Get "http://localhost:8080/version?timeout=32s": dial tcp [::1]:8080: connect: connection refused报错原因: helm v3版本不再需要Tiller,而是直接访问ApiServer来与k8s交互,通过环境变量KUBE

k8s:获取pod的ip

获取pod ipspec:containers:- name: xxxenv:# 获取pod ip,并赋值给容器内的环境变量POD_IP- name: POD_IPvalueFrom:fieldRef:apiVersion: v1fieldPath: status.podIP检查进入pod查看POD_IP:echo $POD_IPcook获取p

#kubernetes
暂无文章信息