So I'm really new to kubernetes and I'm having this problem where the pods keep restarting. I've googled around a bit but not coming up with much help. All I have is a simple apache deployment, nothing fancy.
apiVersion: apps/v1
kind: Deployment
metadata:
name: website-deployment
labels:
app: website
spec:
replicas: 2
selector:
matchLabels:
app: website
template:
metadata:
labels:
app: website
spec:
containers:
- name: apache
image: httpd:2.4.57
ports:
- containerPort: 80
Here is the log from the pod
root@kubemaster:~# kubectl logs website-deployment-cc57f5644-2kg7v -p
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 10.240.0.110. Set the 'ServerName' directive globally to suppress this message
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 10.240.0.110. Set the 'ServerName' directive globally to suppress this message
[Mon Apr 10 19:16:24.132794 2023] [mpm_event:notice] [pid 1:tid 140595614588224] AH00489: Apache/2.4.57 (Unix) configured -- resuming normal operations
[Mon Apr 10 19:16:24.133016 2023] [core:notice] [pid 1:tid 140595614588224] AH00094: Command line: 'httpd -D FOREGROUND'
[Mon Apr 10 19:22:42.890545 2023] [mpm_event:notice] [pid 1:tid 140595614588224] AH00492: caught SIGWINCH, shutting down gracefully
As you can see it runs for a few minutes before getting a SIGWINCH event and this triggers the pod to go into CrashLoopBackOff before starting back up again. This then keeps happening in a loop.
I'm using Ubuntu 22.04 for the master and I have 2 Ubuntu 22.04 for the nodes.
Thanks