Change network plugin on existing cluster - kubernetes

I wonder if there is a best practice/way how to change the network plugin of a running k8s cluster installed by kubespray.
Concrete scenario: in beginning i installed with flannel, now i realized i need need to move to canal.
Tried to find out if kubespray provides an option to remove only network plugin, but doesn't seem so.
Any suggestions, hints?

Related

How to debug kubernetes deployed service using Eclipse

I have a micro service written using Java EE + Openliberty. I have deployed this into kubernetes in my Docker-Desktop. I want to know, is there any way to debug this deployed service? I am using Eclipse. Please let me know how can I debug deployed service. Thank you!
I heartily endorse looking at telepresence. I don't use it for real yet, but I've verified it will be very useful in our enterprise once we get some pieces in place.
However, I don't believe you need that complication for your simpler situation. Telepresence will be very nice for injecting NEW code into a cluster without actually deploying it. In your case, you just want to debug the existing code. This allows for a simpler mechanism.
To remotely debug in Eclipse, you need to connect to a debugger port. To do this with code running in a k8s cluster, you have to expose the port to connect to, and make it available on your desktop.
In your image, you have to ensure that your Java command line has the "-Xdebug" parameters, which specifies the debugger port (5005 by convention). You also have to ensure that your Dockerfile specifies that port to be exposed. When that is running in your cluster, you have to use "kubectl port-forward" on your desktop (with appropriate parameters). This will proxy the debugger port in the cluster to a corresponding port on your desktop. You then connect to that port from Eclipse.
If you want to debug your application, you can do it using either squash or telepresence. Here is great article comparing these two solutions
Article also mentions that squash doesn't support eclipse, but notice that is was written in 2018 and since then squash added support for eclipse IDE.

creating a proper kubeconfig file for a 2 node gentoo linux kubernetes cluster

I have two servers at my home with Gentoo Linux ~amd64.I would like to install Kubernetes on them to play with it a bit.
Gentoo now packages all the Kubernetes related dependencies under one package called sys-cluster/kubernetes and the latest version available at the moment is 1.18.3.
the last time I played with Kubernetes was several years ago and I think I completely forgot everything.
so I installed kubernetes on both servers. since I use systemd and the package contains only kubelet systemd service I created systemd init scripts for also kube-apiserver, kube-controller-manager, kube-proxy and kube-scheduler.
now this package also comes with kubeadm but I would like to know how to install and configure kubernetes manually.
now I want to create a kubeconfig file for my cluster configuration.
I googled and found the following url: http://docs.shippable.com/deploy/tutorial/create-kubeconfig-for-self-hosted-kubernetes-cluster/
the first step is Make sure you can access the cluster but I thought I wanted to create kubeconfig in order for the services to properly know how to access my cluster!
this web site already talks about secrets that where already configured which aren't.. i'm starting from scratch and this is not probably the way to go.
In general I want to know how to properly create a kubeconfig file for my setup, then i'll configure the services to use this kubeconfig file and go on from there.
so any information regarding this issue would be greatly appreciated.
so I asked this also in Kubernetes slack channel and they provided me this project: https://github.com/kelseyhightower/kubernetes-the-hard-way
it's a documentation project on how to configure kubernetes the hard way, in the documentation they set it up in google cloud, but it's easy to understand what they did on cloud and how to configure the same on your network.

Deploying Kubernetes on bare metal rather than VM

Stupid question, but right now I'm deploying my Kubernetes cluster inside a VM. Is there a way to deploy it directly onto my machine?
I'm sure there has to be a easy fix but many of the docs I've read have been focused on deploying it inside VM.
I am assuming you are using some flavor of Linux; otherwise the information below won't be useful to you.
The easiest way of bare metal deployment ("onto your machine") is by using kubeadm. The documentation for that is excellent.
(If you need help with then reply with your exact OS flavor and version and I can edit this answer to reflect that specific situation.)

Installing kubernetes on centos 7

I'm new in kubernetes and I have some doubts about the installation of kubernetes on centos 7, I have read some documentation on some links:
https://kubernetes.io/docs/getting-started-guides/kubeadm/
https://kubernetes.io/docs/getting-started-guides/centos/centos_manual_config/
But I not undestanding which procedure to follow, on first link it show how to install it using kubeadm but at the end of the article on "Limitations" appear that this tool "is a work in progress and these limitations will be addressed in due course", on second link I need to have at least 2 machines, so my question is which is better to use if I will to install it like production.
Thanks in advance
kubeadm.
kubeadm now can support for multi masters, which is considerable for production.
The kubeadm also supplies a secure deployment. It automatically configs TLS settings or RBAC for the cluster, which is not included in the "manual installation page".
My advice: play kubeadm in your development environment first, so that you see how kubeadm deploys a Kubernetes cluster, many components can be deployed by Kubernetes itself. Then, you decide whether use it in your production.
You can follow up the repository made by one of our developer with an additional thing of Horizontal Pod autoscaling of stateless application.
https://github.com/vevsatechnologies/Install-Kubernetes-on-CentOs

How can I install oVirt on one server?

I have one server.
And when I install ovirt I can open web interface at 10.0.0.10.
But, then I try instal host on 10.0.0.10 after that I can`t open 10.0.0.10
So, how I can instal ovirt-engine and host on one server?
Can you give me link to any tutorials?
If you're going to use a single host for both engine and run vms, the supported and suggested configuration is to use Hosted Engine.
See http://www.ovirt.org/documentation/how-to/hosted-engine/
You should follow the official quickstart guide http://www.ovirt.org/documentation/quickstart/quickstart-guide/
This definitely works for oVirt release 3.6 and Fedora 22 Server.
After you add the host in the webgui, it deploys necessary packages and configurations on the host. One of these steps configures and starts iptables. Maybe you first need to disable iptables and reconfigure it and that's the reason why your ovirt-engine isn't available after your deployment is finished. You can read the details which ports to open for iptables in the Quickstart Guide.
If you use CentOS this post maybe also helpful http://blog.mit.bme.hu/meszaros/en/node/193
oVirt Orb is what you are looking for, if you just want to try it out. "oVirt Orb lets you try out oVirt on your own laptop. You can test it and play with it, all without the need to manually install all the components or use multiple hosts or a storage server."
If you have shared storage available somewhere or don't mind setting it up, Hosted Engine (as Sandro mentioned) will give you an Engine Virtual Machine running on a single Host. (Hosted Engine requires NFS, iSCSI, etc.)