-
Kubernetes apiVersion 字段解析
常用 apiVersion v1:Kubernetes API的稳定版本,包含很多核心对象:Pod、Service等。 apps/v1:包含一些通用的应用层的
2022-11-05,阅读:172,标签:Kubernetes
-
Kubernetes 设置 Pod 环境变量
name-value apiVersion: v1 kind: Pod metadata: name: pod-nginx namespace: dev
2022-11-04,阅读:185,标签:Kubernetes
-
Kubernetes Namespace 命名规则
查看帮助 name kubectl explain namespaces.metadata.name namespace kubectl explain nam
2022-11-03,阅读:184,标签:Kubernetes
-
Kubernetes 设置默认 namespace
需求 Kubernetes默认namespace为default,而如果我们设置了自己的namespace,每次都需要添加-n参数指定namespace。 默认
2022-11-02,阅读:207,标签:Kubernetes kubectl
-
Kubernetes 查看所有 Pod 日志
deployment 方式 使用--all-containers=true表示所有容器。 kubectl logs -f deployment/my-deplo
2022-11-01,阅读:281,标签:Kubernetes kubectl
-
Kubernetes 所有 Pod 同时停机原因分析
原因分析 Kubernetes部署了Spring Boot应用,结合Spring Boot Actuator进行健康检查。 Kubernetes 配置 配置了/
2022-10-31,阅读:183,标签:Kubernetes Debug
-
Kubernetes kubectl debug 调试无法 exec 进入的容器
无法进入容器 有些镜像,像distroless,为了容器的精简和安全,不提供shell,从而exec无法进入容器。 kubectl debug 使用kubect
2022-10-30,阅读:253,标签:Kubernetes Debug kubectl
-
Kubernetes kubectl top 命令报 error: Metrics API not available
环境 minikube 错误详情 PS C:\Users\fendoudebb> kubectl top node error: Metrics API
2022-10-29,阅读:668,标签:Kubernetes minikube kubectl
-
Kubernetes kubectl 命令提示
PowerShell 将如下命令追加到$PROFILE中,且重新打开PowerShell。 kubectl completion powershell | Ou
2022-10-28,阅读:170,标签:Kubernetes kubectl
-
Kubernetes kubectl config 管理配置集群
查看当前 config 配置 显示所有集群的配置。 kubectl config view 查看当前生效的配置 --minify只显示当前生效的配置。 kube
2022-10-27,阅读:213,标签:Kubernetes
-
Spring Cloud OpenFeign MultipartException 上传文件异常
错误信息 错误一:MultipartException MultipartException: Current request is not a multipa
2022-10-26,阅读:241,标签:Spring Boot OpenFeign
-
Spring Cloud OpenFeign 自定义 ErrorDecoder
示例代码 配置类 形参中注入Decoder(默认启动时就会注入Decoder,参见默认配置FeignClientsConfiguration),解析respon
2022-10-25,阅读:221,标签:OpenFeign Spring Boot
-
Spring Cloud OpenFeign 使用指定配置
需求 因为OpenFeign被添加在公共库中,且注入到了全局Decoder,所有Feign客户端都使用了@Decoder。 有特殊的客户端不适用全局Decode
2022-10-24,阅读:238,标签:Spring Boot OpenFeign
-
从源码到镜像:使用 Docker 多阶段构建 Spring Boot 镜像
多阶段构建 阶段一 使用Maven打包,拷贝工程源码、pom.xml文件。 阶段二 从阶段一拷贝构建好的jar包,配置运行参数等,完成 Spring Boot
2022-10-23,阅读:193,标签:Spring Boot Docker Maven
-
SpringMVC 使用对象接收 GET 请求参数 QueryString
需求 将问号后的请求参数封装到对象中。 http://localhost:8080/hello?ids=1&ids=2&name=test Co
2022-10-22,阅读:200,标签:SpringMVC Spring Boot
-
Spring Boot 移除指定配置
移除 @Bean 标注的对象 @SpringBootApplication的exclude属性。 适用于@Configuration标注的类。 @SpringB
2022-10-21,阅读:209,标签:Spring Boot
-
自定义 Spring Boot Starter 中的组件无法被 Spring 扫描注册
现象 自定义starter包中的@Controller、@Service、@Component、@Bean等对象没有注入到Spring容器中。 原因 主项目包c
2022-10-20,阅读:242,标签:Spring Boot
-
Spring Boot @ComponentScan exclude 不起作用
现象 使用了@ComponentScan的excludeFilters但不起作用。 示例代码 @ComponentScan(excludeFilters = @
2022-10-19,阅读:183,标签:Spring Boot
-
Spring Boot 使用 Mockito 进行单元测试
示例 @ExtendWith({MockitoExtension.class}) public class HelloServiceTests { @
2022-10-18,阅读:208,标签:Spring Boot 单元测试
-
Spring Boot 单元测试 MockMvc 模拟 HTTP 请求
MockMvc @WebMvcTest标注的单元测试类中,可以注入MockMvc对象。 @SpringBootTest标注的单元测试类,还需要加@AutoCon
2022-10-17,阅读:267,标签:Spring Boot 单元测试 HTTP