Unable to connect to the server: net/http: HTTP/1.x transport connection broken: malformed HTTP resp

命名空间的问题

kubectl config view
apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: REDACTED
    server: https://10.41.4.33:6443
  name: kubernetes
- cluster:
    server: http://10.41.4.33:6443
  name: kubernetes-cluster
contexts:
- context:
    cluster: kubernetes-cluster
    namespace: development
    user: dev
  name: ctx-dev
- context:
    cluster: kubernetes-cluster
    namespace: production
    user: prod
  name: ctx-prod
- context:
    cluster: kubernetes
    user: kubernetes-admin
  name: kubernetes-admin@kubernetes
current-context: kubernetes-admin@kubernetes
kind: Config
preferences: {}
users:
- name: dev
  user:
    password: "123456"
    username: kevin
- name: kubernetes-admin
  user:
    client-certificate-data: REDACTED
    client-key-data: REDACTED
- name: prod
  user:
    password: "123456"
    username: zncu
[root@master ~]# 

查看运行环境 当前的命名空间,看下是不是一开始定义的 

 

你可能感兴趣的:(k8s)