hashicorp / vault-plugin-auth-kubernetes

Vault authentication plugin for Kubernetes Service Accounts
https://www.vaultproject.io/docs/auth/kubernetes.html
Mozilla Public License 2.0
207 stars 61 forks source link

vault HTTP/1.x transport connection broken: malformed HTTP response #80

Closed get2arun closed 2 years ago

get2arun commented 4 years ago

Hi Team,

I have deployed a sample application to talk vault server but having issues related to token it seems.

Environment: Running minishift locally in ubuntu desktop.

In the myproject namespace, vault is running. In the vault-demo namespace, running the sample application using the below deployment.yaml

Expecting the application to login to vault server and kubernetes path mentioned in the environmental variables. but it is showing the error. It seems, some tokens are secrets are missing. image

Please suggest what configuration is missing like any secrets or mount paths missing in the deployment.yaml file.

Below is the configuration of deployment.yaml file. hashitvault$ cat deployment.yaml apiVersion: apps/v1beta1 kind: Deployment metadata: name: basic-example namespace: vault-demo spec: replicas: 1 template: metadata: labels: app: basic-example spec: serviceAccountName: app1 containers:

The below is the ClusterIP of the VAULT SERVER.

ChanderG commented 3 years ago

I faced a similar error with kubernetes and the cause was the lack of the "imagePullSecrets" section in the config.

tomhjp commented 2 years ago

Sorry for the long delay here, but that "Malformed HTTP response" error looks like you are talking HTTP to an HTTPS endpoint. I imagine the kubernetes_host parameter in the Kubernetes auth method's config needs to be set to https://192.168.42.186:8443 in that example