我正在将 hello-world docker 容器部署到 k3d 集群。为了获取外部IP,部署了负载均衡器类型的服务。
之后我希望通过负载均衡器调用应用程序。但我没有得到外部IP。
k3d create --name="mydemocluster" --workers="2" --publish="80:80"
export KUBECONFIG="$(k3d get-kubeconfig --name='mydemocluster')"
kubectl run kubia --image=hello-world --port=8080 --generator=run/v1
kubectl expose rc kubia --type=LoadBalancer --name kubia-http
export KUBECONFIG="$(k3d get-kubeconfig --name='mydemocluster')"
Run Code Online (Sandbox Code Playgroud)
使用 json 模式验证器验证 json 会引发加载 json 模式文件的异常:
at com.networknt.schema.JsonSchemaFactory.findMetaSchemaForSchema(JsonSchemaFactory.java:267)
at com.networknt.schema.JsonSchemaFactory.createValidationContext(JsonSchemaFactory.java:258)
at com.networknt.schema.JsonSchemaFactory.newJsonSchema(JsonSchemaFactory.java:252)
at com.networknt.schema.JsonSchemaFactory.getSchema(JsonSchemaFactory.java:296)
at com.networknt.schema.JsonSchemaFactory.getSchema(JsonSchemaFactory.java:304)
at com.example.demojsonschemavalidation07.JsonSchemaValidator.validate(JsonSchemaValidator.java:28)
at com.example.demojsonschemavalidation07.JsonSchemaValidatorTest.test_valid_message(JsonSchemaValidatorTest.java:19)
...
Run Code Online (Sandbox Code Playgroud)
https://github.com/nusmanov/spring-boot-json-schema-validation/
{
"$id": "https://example.com/person.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Person",
"type": "object",
"properties": {
"firstName": {
"type": "string",
"description": "The person's first name."
},
"lastName": {
"type": "string",
"description": "The person's last name."
},
"age": {
"description": "Age in years which must be …Run Code Online (Sandbox Code Playgroud)