Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application is launched with 0 Pods as shown in the UI #58

Closed
rohits-splunk opened this issue Oct 26, 2022 · 19 comments
Closed

Application is launched with 0 Pods as shown in the UI #58

rohits-splunk opened this issue Oct 26, 2022 · 19 comments

Comments

@rohits-splunk
Copy link
Contributor

rohits-splunk commented Oct 26, 2022

Hello, I was successfully able to launch the application through EC2->Docker driver and accessing the app by port forwarding on the pod. But i am not sure why all the metrics values are 0 . Is there any way i can increase the count ? Sorry but the documentation is not very clear.

image

@rohits-splunk
Copy link
Contributor Author

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

@lucky-sideburn
Copy link
Owner

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?

@rohits-splunk
Copy link
Contributor Author

rohits-splunk commented Oct 27, 2022

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.

@lucky-sideburn
Copy link
Owner

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

@rohits-splunk
Copy link
Contributor Author

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
    <
<title>404 Not Found</title>

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`

@rohits-splunk
Copy link
Contributor Author

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

@lucky-sideburn
Copy link
Owner

:) no problem, we will solve! Can you please let me know your kubernetes distribution and if it is on-premise or in cloud?

@rohits-splunk
Copy link
Contributor Author

Thank you Sir :) I have installed it on minikube ( docker driver) on an EC2 instance. It is a CentOS machine.

@rohits-splunk
Copy link
Contributor Author

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

@rohits-splunk
Copy link
Contributor Author

@lucky-sideburn Anything you found sir ?

@lucky-sideburn
Copy link
Owner

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
namespace/kubeinvaders created
eugenio@luckysideburn:
$ 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

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:$
eugenio@luckysideburn:
$ kubectl get pods -A
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

@lucky-sideburn
Copy link
Owner

I close the ticket @rohits-splunk because is not supporter minukube :)

@rohits-splunk
Copy link
Contributor Author

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 ?

@lucky-sideburn
Copy link
Owner

@rohits-splunk I use KubeSpray :)

@rohits-splunk
Copy link
Contributor Author

Is kubeinvaders supported if i deploy a 1 node cluster on AWS ec2 instance ?

@rohits-splunk
Copy link
Contributor Author

And are you able to access the application on above ingress IP address ?

@lucky-sideburn
Copy link
Owner

Hi @rohits-splunk I only tested it on KubeSpray :) Please let me know!

@rohits-splunk
Copy link
Contributor Author

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 ?

@rohits-splunk
Copy link
Contributor Author

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
    <
<title>404 Not Found</title>

404 Not Found


openresty/1.21.4.1 * Connection #0 to host kubeinvaders.local left intact

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants