Install Custom Connector To Kafka Connect on Kubernetes - kubernetes

I'm running the kafka kubenetes helm deployment, however I am unsure about how to install a custom plugin.
When running custom plugin on my local version of kafka I mount the volume /myplugin to the Docker image, and then set the plugin path environment variable.
I am unsure about how to apply this workflow to the helm charts / kubernetes deployment, mainly how to go about mounting the plugin to the Kafka Connect pod such that it can be found in the default plugin.path=/usr/share/java.

Have a look at the last few slides of https://talks.rmoff.net/QZ5nsS/from-zero-to-hero-with-kafka-connect. You can mount your plugins but the best way is to either build a new image to extend the cp-kafka-connect-base, or to install the plugin at runtime - both using Confluent Hub.

Related

Install geoip2 python library for Odoo 15 on Kubernetes

Hi I have installed Odoo 15 on Kubernetes (using Bitnami chart) and I would like to use the geoip database functionality. To do so, I need to install the geoip2 python library in my Odoo containners before the Odoo server starts.
Installing the geoip2 library is as simple as running pip install geoip2 (or pip3). The problem is that this needs to be done before the Odoo server starts and without ssh-ing into the container (we would like deployments to be entirely automated - no manual interaction).
I've tried InitContainers but they're not a solution because they run in their own container and any library installed in the InitContainer will not be installed in the Odoo container (I am guessing that sidecars would be the same).
Using Lifecyle -> poststart in the deployment yaml does not work either and I suspect that this is because the poststart is executed after the Odoo server is started.
I've tried to use the command: element of the deployment yaml file to first run the install of geoip2 and then the entrypoint of the Odoo image but for some reason this does not seem to work. Maybe this could be a solution if someone can get this to work?
Would anyone have a simple solution, ideally that does not require creating our own image for installing Odoo.
Thanks
Like what David Maze suggested, the simplest and easiest way to get this done is creating a new container image or editing your current container image because all solutions like kubectl or kube jobs or CICD will execute commands inside the container only once the container is brought up. One more option is that you can install geoip2 package and then restart the dependent odoo service but you are saying that this is not working. So, you can edit the existing container image and install geoip2, input your config and commit the image to the registry for creating your deployment.

GITLAB Autoscaling in Kubernetes

I am using GitLab runner in Kubernetes for building our application. Since ours is a docker in a docker use case, we are using Kaniko to build images from a DockerFile.
I am having a hard time figuring out how to implement horizontal/vertical scaling for pods and instances.
Looking at this article https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runnersmachine-section , it says to use docker+machine image, but
I don't want to have any docker dependency in our build process especially when Kubernetes has deprecated docker support in newer versions.
Any advice?

Has anybody successfully did hyper-ledger fabric network setup on Minikube environment?

Are there any examples for creating a blockchain network on top of minikube environment?
Take a look at the following repositories where you can find helm charts which should facilitate the whole deployment process:
https://github.com/hyfen-nl/PIVT
https://github.com/splunk/hyperledger-fabric-k8s
Note that they require helm 2.11 and 2.16 or newer installed in your kubernetes cluster.

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.

Does Kubernetes supports downloading of resources like mesosphere

We know that mesosphere provides mesosphere fetcher in DCOS to download resources into the sandbox directory. Does Kubernetes provides anything similar to same?
While Kubernetes does not have a feature like Mesosphere Fetcher, it is still possible to copy / download resources into a Docker container using the following ways:
Docker's COPY and ADD copy resources from the host into the container.
Docker's ADD supports tar extraction and remote URLs too.
Download / extract resources inside the container using commands like:
wget
curl
lynx
tar
gunzip
No. Kubernetes does not have any built-in feature to download and inject files into a container the way Mesos does.
The Mesos fetcher feature existed before Docker image support, in fact. Prior to images, the fetcher was the primary way to download the executable and any supporting files. Kubernetes never needed that feature because it requires a container image. That said, having both be optional can be useful.
The Mesos fetcher is supported by Mesos, Marathon, and Mesosphere DC/OS.
Kubernetes could hypothetically add support for arbitrary file fetching in the future, but there hasn’t been a lot of demand, and it would probably require either container dependencies within a pod (to use a controller-injected sidecar), a kubelet plugin (to download before container start), or a native fetcher-like feature.