Closed rohits-splunk closed 2 years ago
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
GET /kube/api HTTP/2 Host: kubeinvaders.local User-Agent: curl/7.61.1 Accept: /
GET /kube/api HTTP/2 Host: 192.168.49.2 User-Agent: curl/7.61.1 Accept: /
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
:) 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
@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: https://github.com/kubernetes/minikube/issues/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
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.
GET /kube/api HTTP/1.1 Host: kubeinvaders.local User-Agent: curl/7.79.1 Accept: /
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.