简体   繁体   English

无法访问部署在 Kubernetes 系统上的应用程序 UI

[英]Unable to reach the Application UI deployed on a Kubernetes system

I have deployed a gerrit container and exposed the ports but unable to reach the UI.我已经部署了一个 gerrit 容器并暴露了端口但无法访问 UI。 This is deployed on microk8s on AWS.这部署在 AWS 上的 microk8s 上。 I'm not using ingress我没有使用入口

The Image is an official image from the docker hub.该图像是来自 docker 集线器的官方图像。

https://hub.docker.com/r/k8sgerrit/gerrit-master https://hub.docker.com/r/k8sgerrit/gerrit-master

My code我的代码

apiVersion: apps/v1
kind: Deployment
metadata:
  name: gerrit-deployment
  labels:
    app: gerrit-meta
spec:
  replicas: 1
  selector:
    matchLabels:
      app: gerrit
      type: frontend
  template:
    metadata:
      labels:
        app: gerrit
        type: frontend
    spec:
      containers:
      - name: gerrit
        image: k8sgerrit/gerrit
        ports:
        - containerPort: 80
        - containerPort: 29418

Services File服务文件

apiVersion: v1
kind: Service
metadata:
  name: gerrit-service

spec:
  type: NodePort
  ports:
    - port: 80
      targetPort: 80
      nodePort: 30010
  selector:
      app: gerrit
      type: frontend

root@ip-172-31-3-35:~/microk8s/gerrit312# kubectl get deployments
NAME                READY   UP-TO-DATE   AVAILABLE   AGE
gerrit-deployment   1/1     1            1           21m
root@ip-172-31-3-35:~/microk8s/gerrit312# kubectl get services
NAME             TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)        AGE
gerrit-service   NodePort    10.152.183.210   <none>        80:30010/TCP   6m6s
kubernetes       ClusterIP   10.152.183.1     <none>        443/TCP        34
root@ip-172-31-3-35:~/microk8s/gerrit312# kubectl describe deployment gerrit-deployment
Name:                   gerrit-deployment
Namespace:              default
CreationTimestamp:      Thu, 23 Jul 2020 20:37:47 +0000
Labels:                 app=gerrit-meta
Annotations:            deployment.kubernetes.io/revision: 1
Selector:               app=gerrit,type=frontend
Replicas:               1 desired | 1 updated | 1 total | 1 available | 0 unavailable
StrategyType:           RollingUpdate
MinReadySeconds:        0
RollingUpdateStrategy:  25% max unavailable, 25% max surge
Pod Template:
  Labels:  app=gerrit
           type=frontend
  Containers:
   gerrit:
    Image:        k8sgerrit/gerrit
    Ports:        80/TCP, 29418/TCP
    Host Ports:   0/TCP, 0/TCP
    Environment:  <none>
    Mounts:       <none>
  Volumes:        <none>
Conditions:
  Type           Status  Reason
  ----           ------  ------
  Progressing    True    NewReplicaSetAvailable
  Available      True    MinimumReplicasAvailable
OldReplicaSets:  <none>
NewReplicaSet:   gerrit-deployment-854ccc4d97 (1/1 replicas created)
Events:
  Type    Reason             Age   From                   Message
  ----    ------             ----  ----                   -------
  Normal  ScalingReplicaSet  21m   deployment-controller  Scaled up replica set gerrit-deployment-854ccc4d97 to 1
root@ip-172-31-3-35:~/microk8s/gerrit312#
root@ip-172-31-3-35:~/microk8s/gerrit312# kubectl describe services gerrit-service
Name:                     gerrit-service
Namespace:                default
Labels:                   <none>
Annotations:              <none>
Selector:                 app=gerrit,type=frontend
Type:                     NodePort
IP:                       10.152.183.210
Port:                     <unset>  80/TCP
TargetPort:               80/TCP
NodePort:                 <unset>  30010/TCP
Endpoints:                10.1.88.88:80
Session Affinity:         None
External Traffic Policy:  Cluster
Events:                   <none>

Any help to understand why the UI is not accessible is greatly appreciated.非常感谢任何有助于理解为什么 UI 不可访问的帮助。

Thank you, Anish谢谢你,阿尼什

Managed to fix it.设法修复它。 It was a problem with the port and the nodes were cordoned since it was running short of space这是端口的问题,由于空间不足,节点被封锁

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法使用kubernetes游乐场访问部署在kubernetes集群上的应用程序 - unable to access the application deployed on kubernetes cluster using kubernetes playground 用于部署在 Kubernetes 中的 web 应用程序的集中式和版本化文件系统 - Centralized & versioned file based system for a web application deployed in Kubernetes 当应用程序部署在 Kubernetes 或 Linux 中时,如何从 Kotlin 读取/访问/访问文件 - how read/reach/access a file from Kotlin when the application is deployed either in Kubernetes or Linux 访问部署在 Kubernetes 上的应用程序 - Access application deployed on Kubernetes https Kubernetes 部署的应用程序 - https kubernetes deployed application 无法验证部署在 kubernetes 中的 Mongodb - Unable to authenticate Mongodb deployed in kubernetes 无法访问Kubernetes UI - Unable to access Kubernetes UI C# 应用程序无法访问 kubernetes 服务? - C# application not able to reach a kubernetes service? 无法从部署在同一集群中的我的 golang 应用程序连接到 kubernetes 上的 redis 集群 - Unable to connect to redis cluster on kubernetes from my golang application deployed within the same cluster Kubernetes UI不显示已部署的服务或部署 - Kubernetes ui not showing deployed services or deployyment
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM