0

I've 3 Debian-10 VMs on a bare metal Proxmox host in my network and installed via Ansible the roles geerlingguy.docker and geerlingguy.kubernetes with complete default settings. The kubeadm on the master node shows me the three nodes. So, I think, the installation is fine.

And what now? I'm new to kubernetes, I know there are configs that need to be applied. But how can I "see" them or "change" them via Kubernetes/Ansible. I don't want go back to the command line here. I know about the 'k8s' module - but the examples are not very helpful. A kubernetes should have an ingress controller and some services. Is there a good example playbook for installing Traefik/Haproxy/Nginx/whatever and maybe a small example hello-world-example for Kubernetes? Is there a "map" of possible values for all the YAML options (I used to learn from examples)

Sorry for the very "open" question. I'm searching for some days now and either my questions to Google are wrong or Google sends me always to the same sites with either very "basic" informations that ends by installing the Kubernetes or very "heavy" information, where the author is far away from easy to read.

To make the question a litte bit more concrete.

  • The 3 VM's with IP 192.168.10.10-192.168.10.12 are running with Kubernetes 1.17.9 on Docker 19.03.12
  • I've installed Helm v3.2.4, some repos (Traefik, Nginx, Stable-Kubernetes-Charts)
  • I'm able to install with Helm some -don't know - are that pods or services?
  • I'd like to add a simple hello-world HTTP service, like that from gmolaire (thanks!)
  • That service is exposed to one of the three VMs on port 80

When I run that tutorial with step kubectl create -f ingress.yaml I'm getting the error

Error from server (InternalError): error when creating "ingress.yaml": 
Internal error occurred: failed calling webhook "validate.nginx.ingress.kubernetes.io": Post https://ingress-nginx-controller-admission.ingress-nginx.svc:443/extensions/v1beta1/ingresses?timeout=30s: dial tcp 10.105.231.128:443: connect: connection refused

This might be, because I cannot run kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/mandatory.yaml it ends with a 404.

3

Since your new in this platform, I would suggest you to explore in the bellow order (assuming you want to use nginx as the load balancer ingress controller):

1- This tutorial is the most complete to get started with k8s. I strongly suggest you to follow it through to understand the jargon and the working components before going to the next steps.

2- Take a look at this example where they go through creating an nginx application in a k8s cluster.

3- Look at this tutorial where the author describes the key concepts and working operation of an ingress controller.

4- Finally, look at this to start setting up your ingress controller from the official doc page. Other resources are available to allow you to setup as much as you'd like.

Extra: Here is the official k8s kubectl cheat sheet.

| improve this answer | |
  • Thanks! That helps a little bit. – TRW Aug 5 at 15:51
  • The first tutorial was working fine, but it deploys only. How can I access the nginx on my computer (or somebody else in the network)? The 3 VMs have different IPs and how can I know, which IP is used for the deployment. It starts two replicas and so "on which IP" and on "which port" - because there are no processes listining on port 80. – TRW Aug 5 at 15:51
  • The second tutorial looks good, put stops already after the first command with a 404. The github repo changed the location of the "mandatory" resources - i tried a little bit with other solution (helm nginx) and the last kubectl create stops with "connection refused". So sad - the tutorial looks good, but it is outdated – TRW Aug 5 at 15:51
  • The third tutorial helped me a litte bit with the second tuturial - but - because I'm not able to combine the services with the ingress - I can't see the last step with curl http://<ip>/apple etc. – TRW Aug 5 at 15:51
  • Ok, I see where you are at now. Let me edit the answer to give you and others a better starting point. As for the details on which IP a pod is running, you can do kubectl get po -o wide – gmolaire Aug 5 at 16:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.