AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-615073

jergan95's questions

Martin Hope
jergan95
Asked: 2021-02-01 12:35:50 +0800 CST

Kubernetes 集群中的 curling 服务被公司代理阻止

  • 0

我有一个在公司代理后面运行的 Kubernetes 集群。我没有使用 Minikube。我有http_proxy,https_proxy并no_proxy设置在 //etc/environment. no_proxy 有 127.0.0.0 和每个 node-ip 定义。

如果我尝试从我的主节点使用 ClusterIP 卷曲服务,我会陷入公司代理。我需要做什么才能访问该服务?将服务更改为 NodePort 并从集群外部访问它是可行的。

我希望有人可以向我解释我所缺少的。提前致谢。

部署和服务的 Yaml 文件

apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    run: app
  name: app-blue
spec:
  replicas: 1
  selector:
    matchLabels:
      run: app
      version: 0.0.1
  template:
    metadata:
      labels:
        run: app
        version: 0.0.1
    spec:
      containers:
      - name: app
        image: errm/versions:0.0.1
        ports:
        - containerPort: 3000
----



apiVersion: v1
kind: Service
metadata:
  name: app-service
spec:
  selector:
    run: app
    version: 0.0.1
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: 3000

Kubectl 描述服务

Name:              app-service
Namespace:         default
Labels:            <none>
Annotations:       <none>
Selector:          run=app,version=0.0.1
Type:              ClusterIP
IP Families:       <none>
IP:                10.107.64.107
IPs:               10.107.64.107
Port:              http  80/TCP
TargetPort:        3000/TCP
Endpoints:         10.244.2.4:3000
Session Affinity:  None
Events:            <none>

从主节点卷曲

curl 10.107.64.107:80
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="de" lang="de" xml:lang="de" xmlns="http://www.w3.org/1999/xhtml">

<!--Head-->
<head>
  <meta content="IE=11.0000" http-equiv="X-UA-Compatible">
  <meta http-equiv="content-type" content="text/html; charset=utf-8">
  <title>McAfee Web Gateway - Notification</title>
  <script src="/mwg-internal/de5fs23hu73ds/files/javascript/sw.js" type="text/javascript" ></script>
  <link rel="stylesheet" href="/mwg-internal/de5fs23hu73ds/files/default/web.css" />
</head>
<!--/Head-->
<!--Body-->
<body  onload="swOnLoad();" class="background">
<div class="inner_frame">
<div class="head_right_text">
<img alt="Logo" class="emblem" src='/mwg-internal/de5fs23hu73ds/files/default/img/wappen.png'>
</div>

<img alt="Logo" class="lion_left" src='/mwg-internal/de5fs23hu73ds/files/default/img/bg_loewe_links.png'>
<img alt="Logo" class="lion_right" src='/mwg-internal/de5fs23hu73ds/files/default/img/bg_loewe_rechts.png'>

<!--Contents-->
<div class="msg_border">
<div class="msg_head">
Keine Verbindung m&ouml;glich.
</div>
<div class="msg_text">

<p>
Der Proxy hat eine ung&uuml;ltige Antwort erhalten.
</p>
</div>
</div>

<!--/Contents-->
</div>
</body>
<!--/Body-->
</html>
service proxy kubernetes curl
  • 1 个回答
  • 92 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve