Cluster information:
Kubernetes version:
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.4", GitCommit:"b695d79d4f967c403a96986f1750a35eb75e75f1", GitTreeState:"clean", BuildDate:"2021-11-17T15:48:33Z", GoVersion:"go1.16.10", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.4", GitCommit:"b695d79d4f967c403a96986f1750a35eb75e75f1", GitTreeState:"clean", BuildDate:"2021-11-17T15:42:41Z", GoVersion:"go1.16.10", Compiler:"gc", Platform:"linux/amd64"}
Cloud being used: bare-metal/vsphere
Installation method: kubeadm
Host OS: Ubuntu 20.04
CNI and version: Weave
CRI and version: Docker
I’m using MetalLB.
My problem and info
I’ve been trying to get ingress to work with a simple httpd:latest
deployment. I’m trying to get it to respond on http://httpdtest.example.org. But it always times out.
I have httpdtest.example.org pointed at my ingress-nginx service’s external-ip via my laptops /etc/hosts
file.
I once had my instance of longhorn’s UI responding properly (though it isn’t anymore), so I’m 85% certain I have ingress-nginx configured properly. (I configured ingress per their instructions here.)
Which leave me wondering what I’m missing in my httpdtest manifests.
deployment.yaml:
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: httpd
name: httpd-deployment
namespace: httpdtest
spec:
replicas: 3
selector:
matchLabels:
app: httpd
template:
metadata:
labels:
app: httpd
spec:
containers:
- image: httpd:latest
imagePullPolicy: IfNotPresent
name: httpd
ports:
- containerPort: 80
protocol: TCP
resources:
requests:
cpu: "1.0"
memory: "1G"
limits:
cpu: "1.0"
memory: "1G"
service.yaml:
apiVersion: v1
kind: Service
metadata:
name: httpdtest-service
namespace: httpdtest
labels:
app: httpd
spec:
ports:
- port: 80
name: tcp-80
protocol: TCP
targetPort: 80
selector:
app: httpd
type: ClusterIP
ingress.yaml:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: httpdtest-ingress
namespace: httpdtest
annotations:
kubernetes.io/ingress.class: nginx
spec:
rules:
- host: httpdtest.example.org
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: httpdtest-service
port:
number: 80
Everything appears to be running:
$ kubectl -n httpdtest get all
NAME READY STATUS RESTARTS AGE
pod/httpd-deployment-8475bd6c66-45xdf 1/1 Running 0 27m
pod/httpd-deployment-8475bd6c66-cmdp2 1/1 Running 0 27m
pod/httpd-deployment-8475bd6c66-r5xm6 1/1 Running 0 27m
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/httpd-service ClusterIP 172.20.209.13 <none> 80/TCP 33m
service/httpdtest-service ClusterIP 172.20.100.56 <none> 80/TCP 26m
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/httpd-deployment 3/3 3 3 27m
NAME DESIRED CURRENT READY AGE
replicaset.apps/httpd-deployment-8475bd6c66 3 3 3 27m
Is there any other info that would help shed light on this?
Anyone see something I’m missing?
Thanks in advance!