<p>I have this yaml manifest for redis</p>

<pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
kind: Pod
metadata:
  name: redis-pod
  namespace: redis-namespace
  labels:
    app: redis
spec:
  containers:
  - name: redis-cntr
    image: redis
    imagePullPolicy: IfNotPresent
    ports:
    - name: redis-port
      containerPort: 6379
    envFrom:
    - secretRef:
        name: redis-secret
    command:
    - redis-server
    readinessProbe:
      exec:
        command:
        - redis-cli
        - ping
      initialDelaySeconds: 3
      periodSeconds: 10
      timeoutSeconds: 1
      successThreshold: 1
      failureThreshold: 3
    volumeMounts:
    - name: redis-vol
      mountPath: /data
    - name: config
      mountPath: /usr/local/etc/redis
  volumes:
  - name: redis-vol
    emptyDir: {}
  - name: config
    configMap:
      name: redis-config
      items:
      - key: redis-config
        path: redis.conf

---
apiVersion: v1
kind: Service
metadata:
  name: redis-service
  namespace: redis-namespace
spec:
  type: ClusterIP
  selector:
    app: redis
  ports:
  - name: redis-srv-port
    port: 6379
    targetPort: redis-port
    protocol: TCP
</code></pre>

<p>I run this manifest and the pod is running (no errors) and the service is as:</p>

<pre class="lang-sh prettyprint-override"><code>$ kubectl describe service redis-service
Name:              redis-service
Namespace:         redis-namespace
Labels:            &lt;none&gt;
Annotations:       Selector:  app=redis
Type:              ClusterIP
IP:                10.107.206.191
Port:              redis-srv-port  6379/TCP
TargetPort:        redis-port/TCP
Endpoints:         172.17.0.5:6379
Session Affinity:  None
Events:            &lt;none&gt;
</code></pre>

<p>To test the connection from another pod I create an interactive pod:</p>

<pre class="lang-sh prettyprint-override"><code>$ kubectl run -it alpine --image=alpine --restart=Never -- /bin/sh
</code></pre>

<p>I try to curl the redis pod with <code>curl redis-service:6379</code> but the is returned <code>curl: (1) Received HTTP/0.9 when not allowed</code>. I have attempted to do <code>curl -u default:mysecretpassword redis-service:6379</code> and get the same results. I do a <code>nslookup</code>:</p>

<pre class="lang-sh prettyprint-override"><code>$ / # nslookup redis-service
Server:     10.96.0.10
Address:    10.96.0.10:53

Name:   redis-service.redis-namespace.svc.cluster.local
Address: 10.107.206.191
</code></pre>

<p>If I curl the endpoints <code>curl 172.17.0.5:6379</code> I get the same thing. Both pods are on the same namespace. Any idea why the alpine pod unable to curl the redis-service? Not really sure if being able to curl the service is crucial for other applications to be able to connect to the redis pod.</p>

<blockquote>
  <p>note: the <code>redis.conf</code> has the following changes:</p>
  
  <p><code>requirepass mysecretpass</code></p>
  
  <p><code># bind 127.0.0.1</code>  //commented</p>
  
  <p><code>appendonly yes</code></p>
  
  <p><code>protected-mode yes</code></p>
</blockquote>

M.Holmes
<p>Redis is not using HTTP protocol for client connection. So any http client like CURL cannot directly communicate with Redis server.</p>

<p>You can use redis-cli for testing</p>
