108 lines
5.0 KiB
Plaintext
108 lines
5.0 KiB
Plaintext
grape@lonetrek:~/Documents/devops/devops/kubernetes$ kubectl get nodes
|
|
NAME STATUS ROLES AGE VERSION
|
|
k8s-master0 Ready control-plane 6d23h v1.34.1
|
|
k8s-master1 Ready control-plane 6d23h v1.34.1
|
|
k8s-master2 Ready control-plane 6d23h v1.34.1
|
|
k8s-worker0 Ready <none> 6d23h v1.34.1
|
|
k8s-worker1 Ready <none> 6d23h v1.34.1
|
|
k8s-worker2 Ready <none> 6d23h v1.34.1
|
|
grape@lonetrek:~/Documents/devops/devops/kubernetes$ cat nginx-pod.yaml
|
|
apiVersion: v1
|
|
kind: Pod
|
|
metadata:
|
|
name: nginx-pod
|
|
labels:
|
|
app: nginx
|
|
spec:
|
|
containers:
|
|
- name: nginx
|
|
image: docker.io/nginx:latest
|
|
ports:
|
|
- containerPort: 80
|
|
grape@lonetrek:~/Documents/devops/devops/kubernetes$ kubectl port-forward pod/nginx-pod 8080:80 &
|
|
[1] 617748
|
|
grape@lonetrek:~/Documents/devops/devops/kubernetes$ Forwarding from 127.0.0.1:8080 -> 80
|
|
curl -IL localhost:8080
|
|
Handling connection for 8080
|
|
HTTP/1.1 200 OK
|
|
Server: nginx/1.29.2
|
|
Date: Thu, 09 Oct 2025 11:50:08 GMT
|
|
Content-Type: text/html
|
|
Content-Length: 615
|
|
Last-Modified: Tue, 07 Oct 2025 17:04:07 GMT
|
|
Connection: keep-alive
|
|
ETag: "68e54807-267"
|
|
Accept-Ranges: bytes
|
|
|
|
grape@lonetrek:~/Documents/devops/devops/kubernetes$ kubectl describe pod nginx-pod
|
|
Name: nginx-pod
|
|
Namespace: default
|
|
Priority: 0
|
|
Service Account: default
|
|
Node: k8s-worker2/192.168.88.229
|
|
Start Time: Thu, 09 Oct 2025 12:34:45 +0300
|
|
Labels: app=nginx
|
|
Annotations: <none>
|
|
Status: Running
|
|
IP: 10.244.5.5
|
|
IPs:
|
|
IP: 10.244.5.5
|
|
Containers:
|
|
nginx:
|
|
Container ID: cri-o://d4afd0e4cc9d1f475663fdccc6694b7fdd7841d212feccc5c03a435ecd729733
|
|
Image: docker.io/nginx:latest
|
|
Image ID: docker.io/library/nginx@sha256:35fabd32a7582bed5da0a40f41fd4984df7ddff32f81cd6be4614d07240ec115
|
|
Port: 80/TCP
|
|
Host Port: 0/TCP
|
|
State: Running
|
|
Started: Thu, 09 Oct 2025 12:34:55 +0300
|
|
Ready: True
|
|
Restart Count: 0
|
|
Environment: <none>
|
|
Mounts:
|
|
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-27hx7 (ro)
|
|
Conditions:
|
|
Type Status
|
|
PodReadyToStartContainers True
|
|
Initialized True
|
|
Ready True
|
|
ContainersReady True
|
|
PodScheduled True
|
|
Volumes:
|
|
kube-api-access-27hx7:
|
|
Type: Projected (a volume that contains injected data from multiple sources)
|
|
TokenExpirationSeconds: 3607
|
|
ConfigMapName: kube-root-ca.crt
|
|
Optional: false
|
|
DownwardAPI: true
|
|
QoS Class: BestEffort
|
|
Node-Selectors: <none>
|
|
Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
|
|
node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
|
|
Events: <none>
|
|
grape@lonetrek:~/Documents/devops/devops/kubernetes$ kubectl logs nginx-pod
|
|
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
|
|
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
|
|
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
|
|
10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
|
|
10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
|
|
/docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh
|
|
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
|
|
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
|
|
/docker-entrypoint.sh: Configuration complete; ready for start up
|
|
2025/10/09 09:34:55 [notice] 1#1: using the "epoll" event method
|
|
2025/10/09 09:34:55 [notice] 1#1: nginx/1.29.2
|
|
2025/10/09 09:34:55 [notice] 1#1: built by gcc 14.2.0 (Debian 14.2.0-19)
|
|
2025/10/09 09:34:55 [notice] 1#1: OS: Linux 6.8.0-84-generic
|
|
2025/10/09 09:34:55 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
|
|
2025/10/09 09:34:55 [notice] 1#1: start worker processes
|
|
2025/10/09 09:34:55 [notice] 1#1: start worker process 24
|
|
2025/10/09 09:34:55 [notice] 1#1: start worker process 25
|
|
2025/10/09 09:34:55 [notice] 1#1: start worker process 26
|
|
2025/10/09 09:34:55 [notice] 1#1: start worker process 27
|
|
127.0.0.1 - - [09/Oct/2025:09:35:17 +0000] "GET / HTTP/1.1" 200 615 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:143.0) Gecko/20100101 Firefox/143.0" "-"
|
|
2025/10/09 09:35:17 [error] 24#24: *1 open() "/usr/share/nginx/html/favicon.ico" failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "127.0.0.1:8080", referrer: "http://127.0.0.1:8080/"
|
|
127.0.0.1 - - [09/Oct/2025:09:35:17 +0000] "GET /favicon.ico HTTP/1.1" 404 153 "http://127.0.0.1:8080/" "Mozilla/5.0 (X11; Linux x86_64; rv:143.0) Gecko/20100101 Firefox/143.0" "-"
|
|
127.0.0.1 - - [09/Oct/2025:11:50:08 +0000] "HEAD / HTTP/1.1" 200 0 "-" "curl/8.5.0" "-"
|
|
grape@lonetrek:~/Documents/devops/devops/kubernetes$
|