Application is launched with 0 Pods as shown in the UI
rohits-splunk opened this issue ยท 19 comments
Also , i created the nodeport service, nginx service and added kubernetes.local in etc/hosts , but for some reason the IP address of the ingress is blank :
kubectl get ingress -n kubeinvaders
NAME CLASS HOSTS ADDRESS PORTS AGE
kubeinvaders nginx kubeinvaders.io 80, 443 3h46m
Hi @rohits-splunk for metrics I need some logs of your running kubeinvaders pod. May there is some error in lua code.
At moment we do not support nodeport service, can you investigate on helm chart?
I can quickly send the logs to you . Also If Node Port service is not supported, should i be running it via the NGINX service ?
log_2022-10-27.csv
Sorry i am very new to Helm Chart and K8s . But i have come a long way, Just need to launch the application with enough load to generate the right metric data. I know if the replica set desires only 1 pod it wont scale more than that. Also If i am directly reaching the running pod through port forwarding, i wont be able to see full load of the application which could be distributed across multiple pods.
Attaching here.
Hi @rohits-splunk thanks!
Did you use this for installing? Of course kubeinvaders.io must be changed with the URL you want to choose for reach KubeInvaders...
helm repo add kubeinvaders https://lucky-sideburn.github.io/helm-charts/
helm repo update
kubectl create namespace kubeinvaders
helm install kubeinvaders --set-string config.target_namespace="namespace1\,namespace2" \
-n kubeinvaders kubeinvaders/kubeinvaders --set ingress.enabled=true --set ingress.hostName=kubeinvaders.io --set deployment.image.tag=v1.9.5
Yes i used these steps exactly and almost did for 10 times :) Also i changed the ingress.hostname=kubernetes.local and entered the ingress controller IP address and hostname in /etc/hosts but i am still not able to access the application.
`curl https://kubeinvaders.local/kube/api -k -v
- Trying 192.168.49.2...
- TCP_NODELAY set
- Connected to kubeinvaders.local (192.168.49.2) port 443 (#0)
- ALPN, offering h2
- ALPN, offering http/1.1
- successfully set certificate verify locations:
- CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none - TLSv1.3 (OUT), TLS handshake, Client hello (1):
- TLSv1.3 (IN), TLS handshake, Server hello (2):
- TLSv1.3 (IN), TLS handshake, [no content] (0):
- TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
- TLSv1.3 (IN), TLS handshake, [no content] (0):
- TLSv1.3 (IN), TLS handshake, Certificate (11):
- TLSv1.3 (IN), TLS handshake, [no content] (0):
- TLSv1.3 (IN), TLS handshake, CERT verify (15):
- TLSv1.3 (IN), TLS handshake, [no content] (0):
- TLSv1.3 (IN), TLS handshake, Finished (20):
- TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
- TLSv1.3 (OUT), TLS handshake, [no content] (0):
- TLSv1.3 (OUT), TLS handshake, Finished (20):
- SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
- ALPN, server accepted to use h2
- Server certificate:
- subject: O=Acme Co; CN=Kubernetes Ingress Controller Fake Certificate
- start date: Oct 27 08:02:13 2022 GMT
- expire date: Oct 27 08:02:13 2023 GMT
- issuer: O=Acme Co; CN=Kubernetes Ingress Controller Fake Certificate
- SSL certificate verify result: self signed certificate (18), continuing anyway.
- Using HTTP2, server supports multi-use
- Connection state changed (HTTP/2 confirmed)
- Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
- TLSv1.3 (OUT), TLS app data, [no content] (0):
- TLSv1.3 (OUT), TLS app data, [no content] (0):
- TLSv1.3 (OUT), TLS app data, [no content] (0):
- Using Stream ID: 1 (easy handle 0x55a6f9b7f6b0)
- TLSv1.3 (OUT), TLS app data, [no content] (0):
GET /kube/api HTTP/2
Host: kubeinvaders.local
User-Agent: curl/7.61.1
Accept: /
- TLSv1.3 (IN), TLS handshake, [no content] (0):
- TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
- TLSv1.3 (IN), TLS handshake, [no content] (0):
- TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
- TLSv1.3 (IN), TLS app data, [no content] (0):
- Connection state changed (MAX_CONCURRENT_STREAMS == 128)!
- TLSv1.3 (OUT), TLS app data, [no content] (0):
- TLSv1.3 (IN), TLS app data, [no content] (0):
< HTTP/2 404
< date: Thu, 27 Oct 2022 13:03:31 GMT
< content-type: text/html
<
404 Not Found
openresty/1.21.4.1 * TLSv1.3 (IN), TLS app data, [no content] (0): * Connection #0 to host kubeinvaders.local left intact [splunker@ip-10-202-11-19 ~]$ curl https://192.168.49.2/kube/api -k -v * Trying 192.168.49.2... * TCP_NODELAY set * Connected to 192.168.49.2 (192.168.49.2) port 443 (#0) * ALPN, offering h2 * ALPN, offering http/1.1 * successfully set certificate verify locations: * CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none * TLSv1.3 (OUT), TLS handshake, Client hello (1): * TLSv1.3 (IN), TLS handshake, Server hello (2): * TLSv1.3 (IN), TLS handshake, [no content] (0): * TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8): * TLSv1.3 (IN), TLS handshake, [no content] (0): * TLSv1.3 (IN), TLS handshake, Certificate (11): * TLSv1.3 (IN), TLS handshake, [no content] (0): * TLSv1.3 (IN), TLS handshake, CERT verify (15): * TLSv1.3 (IN), TLS handshake, [no content] (0): * TLSv1.3 (IN), TLS handshake, Finished (20): * TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1): * TLSv1.3 (OUT), TLS handshake, [no content] (0): * TLSv1.3 (OUT), TLS handshake, Finished (20): * SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384 * ALPN, server accepted to use h2 * Server certificate: * subject: O=Acme Co; CN=Kubernetes Ingress Controller Fake Certificate * start date: Oct 27 08:02:13 2022 GMT * expire date: Oct 27 08:02:13 2023 GMT * issuer: O=Acme Co; CN=Kubernetes Ingress Controller Fake Certificate * SSL certificate verify result: self signed certificate (18), continuing anyway. * Using HTTP2, server supports multi-use * Connection state changed (HTTP/2 confirmed) * Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0 * TLSv1.3 (OUT), TLS app data, [no content] (0): * TLSv1.3 (OUT), TLS app data, [no content] (0): * TLSv1.3 (OUT), TLS app data, [no content] (0): * Using Stream ID: 1 (easy handle 0x55785d37d6b0) * TLSv1.3 (OUT), TLS app data, [no content] (0): > GET /kube/api HTTP/2 > Host: 192.168.49.2 > User-Agent: curl/7.61.1 > Accept: */* > * TLSv1.3 (IN), TLS handshake, [no content] (0): * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4): * TLSv1.3 (IN), TLS handshake, [no content] (0): * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4): * TLSv1.3 (IN), TLS app data, [no content] (0): * Connection state changed (MAX_CONCURRENT_STREAMS == 128)! * TLSv1.3 (OUT), TLS app data, [no content] (0): * TLSv1.3 (IN), TLS app data, [no content] (0): < HTTP/2 404 < date: Thu, 27 Oct 2022 13:04:06 GMT < content-type: text/html < content-length: 146 < <title>404 Not Found</title>
404 Not Found
nginx * TLSv1.3 (IN), TLS app data, [no content] (0): * Connection #0 to host 192.168.49.2 left intact`
Also my i still dont have external IP on kubeinvaders service ( cluster IP ) and Loadbalancer
kubectl get svc -n kubeinvaders
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubeinvaders ClusterIP 10.107.250.82 8080/TCP 12h
nginx-ingress-ingress-nginx-controller LoadBalancer 10.105.191.251 80:32025/TCP,443:31016/TCP 12h
nginx-ingress-ingress-nginx-controller-admission ClusterIP 10.101.28.104 443/TCP 12h
:) no problem, we will solve! Can you please let me know your kubernetes distribution and if it is on-premise or in cloud?
Thank you Sir :) I have installed it on minikube ( docker driver) on an EC2 instance. It is a CentOS machine.
After i did minikube tunnel , i can see the external IP against the nginx-ingress-ingress-nginx-controller( LoadBalancer) service .
But i am still not able to access the app from the local browser.
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubeinvaders ClusterIP 10.107.250.82 8080/TCP 12h
nginx-ingress-ingress-nginx-controller LoadBalancer 10.105.191.251 10.105.191.251 80:32025/TCP,443:31016/TCP 12h
nginx-ingress-ingress-nginx-controller-admission ClusterIP 10.101.28.104 443/TCP 12h
@lucky-sideburn Anything you found sir ?
Hi @rohits-splunk,
I never tried KubeInvaders on Minikube :) Anyway I made the following test:
~$ minikube start --driver=docker
๐ minikube v1.27.1 on Darwin 12.4
โจ Using the docker driver based on user configuration
๐ Using Docker Desktop driver with root privileges
๐ Starting control plane node minikube in cluster minikube
๐ Pulling base image ...
๐พ Downloading Kubernetes v1.25.2 preload ...
> preloaded-images-k8s-v18-v1...: 385.41 MiB / 385.41 MiB 100.00% 10.21 M
> gcr.io/k8s-minikube/kicbase: 387.11 MiB / 387.11 MiB 100.00% 5.46 MiB p
> gcr.io/k8s-minikube/kicbase: 0 B [________________________] ?% ? p/s 38s
๐ฅ Creating docker container (CPUs=2, Memory=4000MB) ...
๐งฏ Docker is nearly out of disk space, which may cause deployments to fail! (96% of capacity). You can pass '--force' to skip this check.
๐ก Suggestion:
Try one or more of the following to free up space on the device:
1. Run "docker system prune" to remove unused Docker data (optionally with "-a")
2. Increase the storage allocated to Docker for Desktop by clicking on:
Docker icon > Preferences > Resources > Disk Image Size
3. Run "minikube ssh -- docker system prune" if using the Docker container runtime
๐ฟ Related issue: kubernetes/minikube#9024
๐ณ Preparing Kubernetes v1.25.2 on Docker 20.10.18 ...
โช Generating certificates and keys ...
โช Booting up control plane ...
โช Configuring RBAC rules ...
๐ Verifying Kubernetes components...
โช Using image gcr.io/k8s-minikube/storage-provisioner:v5
๐ Enabled addons: storage-provisioner, default-storageclass
โ /usr/local/bin/kubectl is version 1.23.3, which may have incompatibilites with Kubernetes 1.25.2.
โช Want kubectl v1.25.2? Try 'minikube kubectl -- get pods -A'
๐ Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
~$ minikube addons enable ingress
๐ก ingress is an addon maintained by Kubernetes. For any concerns contact minikube on GitHub.
You can view the list of minikube maintainers at: https://github.com/kubernetes/minikube/blob/master/OWNERS
๐ก After the addon is enabled, please run "minikube tunnel" and your ingress resources would be available at "127.0.0.1"
โช Using image k8s.gcr.io/ingress-nginx/controller:v1.2.1
โช Using image k8s.gcr.io/ingress-nginx/kube-webhook-certgen:v1.1.1
โช Using image k8s.gcr.io/ingress-nginx/kube-webhook-certgen:v1.1.1
๐ Verifying ingress addon...
๐ The 'ingress' addon is enabled
eugenio@luckysideburn:~$ helm repo update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "kubeinvaders" chart repository
Update Complete. โ Happy Helming!โ
$ kubectl create namespace kubeinvaders$ helm install kubeinvaders --set-string config.target_namespace="namespace1,namespace2" \
namespace/kubeinvaders created
eugenio@luckysideburn:
-n kubeinvaders kubeinvaders/kubeinvaders --set ingress.enabled=true --set ingress.hostName=kubeinvaders.io --set deployment.image.tag=v1.9.5
NAME: kubeinvaders
LAST DEPLOYED: Thu Oct 27 20:54:57 2022
NAMESPACE: kubeinvaders
STATUS: deployed
REVISION: 1
NOTES:
Thank you for installing KubeInvaders!
Visit https://kubeinvaders.io
eugenio@luckysideburn:$$ kubectl get pods -A
eugenio@luckysideburn:
NAMESPACE NAME READY STATUS RESTARTS AGE
ingress-nginx ingress-nginx-admission-create-jghxz 0/1 Completed 0 3m37s
ingress-nginx ingress-nginx-admission-patch-pgpz9 0/1 Completed 1 3m37s
ingress-nginx ingress-nginx-controller-5959f988fd-zcrgw 1/1 Running 0 3m37s
kube-system coredns-565d847f94-jcdnf 1/1 Running 0 7m1s
kube-system etcd-minikube 1/1 Running 0 7m16s
kube-system kube-apiserver-minikube 1/1 Running 0 7m14s
kube-system kube-controller-manager-minikube 1/1 Running 0 7m17s
kube-system kube-proxy-hx4gz 1/1 Running 0 7m1s
kube-system kube-scheduler-minikube 1/1 Running 0 7m14s
kube-system storage-provisioner 1/1 Running 1 (6m58s ago) 7m11s
kubeinvaders kubeinvaders-5d56cdd9cf-gsvb4 0/1 ContainerCreating 0 5s
~$ kubectl get ingress -A
NAMESPACE NAME CLASS HOSTS ADDRESS PORTS AGE
kubeinvaders kubeinvaders nginx kubeinvaders.io 192.168.49.2 80, 443 84s
I close the ticket @rohits-splunk because is not supporter minukube :)
Hello @lucky-sideburn I have been able to reach upto this level as well. If Minikube is not a supported way, then what should be the ideal way to do it ? Just on the docker desktop ?
@rohits-splunk I use KubeSpray :)
Is kubeinvaders supported if i deploy a 1 node cluster on AWS ec2 instance ?
And are you able to access the application on above ingress IP address ?
Hi @rohits-splunk I only tested it on KubeSpray :) Please let me know!
Kubespray is something new for me, i just created a 3 node cluster on digital ocean . Do you know if users have been able to deploy this application on digital ocean ?
I still see 404 when accessing the api.
- SSL connection using TLSv1.3 / AEAD-AES256-GCM-SHA384
- ALPN, server did not agree to a protocol
- Server certificate:
- subject: O=Acme Co; CN=Kubernetes Ingress Controller Fake Certificate
- start date: Jan 26 07:08:23 2011 GMT
- expire date: Nov 11 07:08:23 2284 GMT
- issuer: C=US; ST=California; L=Sunnyvale; O=Bad Server Certificate [invalid server certificate]; CN=Bad Server Certificate
- SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
GET /kube/api HTTP/1.1
Host: kubeinvaders.local
User-Agent: curl/7.79.1
Accept: /
- Mark bundle as not supporting multiuse
< HTTP/1.1 404 Not Found
< Date: Fri, 28 Oct 2022 13:44:40 GMT
< Content-Type: text/html
< Transfer-Encoding: chunked
< Connection: keep-alive
< Strict-Transport-Security: max-age=15724800; includeSubDomains
<
404 Not Found
openresty/1.21.4.1 * Connection #0 to host kubeinvaders.local left intact