- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
您好,我尝试通过 fabric8 访问 th spring-boot 教程应用
之后:
C:\Users\gregor>kubectl expose deployment springboottut --type=LoadBalancer --name=my-service
service "my-service" exposed
C:\Users\gregor>kubectl get services my-service
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
my-service 10.0.0.200 <pending> 8080:30852/TCP,9779:32327/TCP,8778:31587/TCP 19s
C:\Users\gregor>kubectl describe services my-service
Name: my-service
Namespace: default
Labels: group=net.sklorz
project=springboottut
provider=fabric8
version=0.0.1-SNAPSHOT
Annotations: <none>
Selector: group=net.sklorz,project=springboottut,provider=fabric8,version=0.0.1-SNAPSHOT
Type: LoadBalancer
IP: 10.0.0.200
Port: port-1 8080/TCP
NodePort: port-1 30852/TCP
Endpoints: 172.17.0.9:8080
Port: port-2 9779/TCP
NodePort: port-2 32327/TCP
Endpoints: 172.17.0.9:9779
Port: port-3 8778/TCP
NodePort: port-3 31587/TCP
Endpoints: 172.17.0.9:8778
Session Affinity: None
Events: <none>
C:\Users\gregor> kubectl get pods --output=wide
NAME READY STATUS RESTARTS AGE IP NODE
configmapcontroller-4273343753-hfg5q 1/1 Running 17 6d 172.17.0.7 minikube
exposecontroller-1770961830-hbkgg 1/1 Running 17 6d 172.17.0.6 minikube
fabric8-3873669821-rhvw5 2/2 Running 33 6d 172.17.0.2 minikube
fabric8-docker-registry-125311296-ghrl8 1/1 Running 17 6d 172.17.0.11 minikube
fabric8-forge-1088523184-k0q82 1/1 Running 17 6d 172.17.0.4 minikube
gogs-2069416242-nc1j6 1/1 Running 15 6d 172.17.0.8 minikube
jenkins-56914896-5zcl2 1/1 Running 27 6d 172.17.0.5 minikube
nexus-2230784709-1k9kr 1/1 Running 17 6d 172.17.0.12 minikube
springboottut-1863166851-0778n 1/1 Running 0 16m 172.17.0.9 minikube
然后询问浏览器: http://172.17.0.9:8080或者 http://100.0.0.200:8080
我显然漏掉了什么,文档也没有再给我任何提示。请问有什么想法吗?感谢您的帮助。
最佳答案
您尝试访问的两个地址(172.* 和 10.*)都是私有(private) IP,无法通过公共(public)互联网直接寻址。
您的服务将外部 IP 列为待处理。
EXTERNAL-IP
<pending>
一旦云提供商填写了该值,该值就是您应该用作浏览器地址的公共(public)端点。不要忘记添加任何必要的端口 8080
关于kubectl expose - 我错过了什么吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44163675/
使用 Config View 获取以下输出。注意没有“当前上下文” root@Bootstrap [ /etc ]# kubectl config view apiVersion: v1 cluste
最近在学习Kubernetes,对“kubectl apply”和“kubectl replace”的区别不是很清楚。有没有我们只能使用其中一种的情况? 最佳答案 我已经写了一篇关于 apply、re
我想使用单个 kubectl patch 命令修补 Kubernetes 部署中的所有 容器模板,而不必知道它们的名称。这可能吗? 我知道我可以通过awk、sed、jq和kubectl replace
我能找到的唯一两种身份验证方法是创建一个新的身份验证上下文,例如 kubectl config set-credentials gajus/foo --token=foo kubectl config
我正在尝试使用 kubectl -o jsonpath 从服务 yaml(在元数据注释下)检索 kubernetes last-applied-configuration,但该字段的名称是“kubec
我在 k8s 中已有部署,我想更新容器,我在部署和运行中更新了 docker 镜像标签(新的唯一 ID): kubectl apply -f testdeploy.yml --namespace=my
我正在尝试在 kubectl 中使用 kustomize。具体来说,我想知道等效的 kubectl 命令: kustomize build --load_restrictor LoadRestrict
对于每个带有kubectl的命令,我需要使用sudo kubectl。 我了解安全性观点,但是我正在测试环境中工作,并且希望能够不使用sudo来使用它。 我尝试运行sudo -i并使用root帐户运行
如何在 YAML 文件中使用环境变量? 我正在使用 kubectl 创建命名空间,并想知道如何使用变量而不是 testnamespace喜欢 name: $var apiVersion: v1 kin
我使用 Mac OS 作为开发环境。 如果我安装 minikube , kubectl将使用 minikube 制作的本地集群作为默认选项。我发现我可以使用 kubectl命令与 minikube前缀
我对文档的理解是: kubectl create 在集群中创建新的 k8s 资源 kubectl replace 更新实时集群中的资源 kubectl apply 如果我想做创建+替换 ( Refer
我是 k8s 新手,在这里遇到了一个小问题。 上下文如下:我需要每天通过 crontask 调用 kubectl delete [podname] 一次,并等到 k8s 重新创建 pod,然后登录到该
通过使用kubectl exec -ti POD_NAME bash我能够访问容器内的终端并执行命令。 我能理解上面命令的可用性和方便性。作为 K8s 运算符(operator),我经常使用 exec
我是 kubernetes 的新手,正在尝试了解何时使用 kubectl autoscale 和 kubectl scale 命令 最佳答案 部署中的 规模 表示应始终运行多少 pod 以确保应用程序
我用 kubectl create -f pod.xml 创建了一个 pod和 kubectl apply -f pod.xml使用下面的 yaml,我没有看到任何区别,使用这两个命令创建了一个 po
我一直在使用带有各种标志的“kubectl run”以交互方式运行作业,但最近我已经超出了我可以用这些标志做的事情,并且已经逐渐使用 YAML 配置文件来描述我的工作。 但是,我找不到与“-i”和“-
在reference docs ,他们说您可以像这样打印容器的图像。 kubectl get pod test-pod -o custom-columns=CONTAINER:.spec.contai
我正在使用 kubectl 来控制 Azure 上的 Kubernetes 服务(扩展、获取 pod 状态)。在生产脚本中自动调用 kubectl 是否安全,而不用担心凭证会过期? 这是我在生产服务器
我正在尝试使用 kubeadm 工具创建一个高可用性集群。我正在尝试安装 kubeadm 安装的先决条件中指定的工具。当我运行时 sudo apt-get install -y kubelet kub
我的 CI 工具使用生命周期,所以如果 Dev 部署有效,它会进入 QA。 我有一个端到端的测试容器,我想在 kubernetes 中运行,但是如何从容器中获取退出代码? 我可以以某种方式运行容器并在
我是一名优秀的程序员,十分优秀!