Kubernets plugins

Manage Kubernetes Plugins with Krew

There have been quite a few posts recently describing how to write custom plugins, now that the mechanism for creating and working with them has been made easier in upstream Kubernetes (as of v1.12). Here are the official plugin docs if you’re interested in learning more about how it all works.

One neat thing about the new plugin architecture is that they don’t need to be written in Go to be recognized by kubectl. There is a document in the Kubernetes repo that describes how to write your own custom plugin and even a helper library for making it easier to write plugins.

Instead of just writing another tutorial about how to make your own plugin, I decided to show how easy it is to grab and experiment with existing plugins.

Installing krew

If you haven’t heard about it yet, Krew is a new tool released by the Google Container Tools team for managing Kubernetes plugins. As far as I know this is the first plugin manager offering available, and it really scratches my itch for finding a specific tool for a specific job (while also being easy to use).

Krew basically builds on top of the kubectl plugin architecture for making it easier to deal with plugins by providing a sort of framework for keeping track of things and making sure they are doing what they are supposed to.

The following kubectl-compatible plugins are available:

/home/jmreicha/.krew/bin/kubectl-krew
/home/jmreicha/.krew/bin/kubectl-rbac_lookup
...

You can manage plugins without Krew, but if you work with a lot of plugins complexity and maintenance generally start to escalate quickly if you are managing everything manually. Below I will show you how easy it is to deal with plugins instead using Krew.

There are installation instructions in the repo, but it is really easy to get going. Run the following commands in your shell and you are ready to go.

(
  set -x; cd "$(mktemp -d)" &&
  curl -fsSLO "https://storage.googleapis.com/krew/v0.2.1/krew.{tar.gz,yaml}" &&
  tar zxvf krew.tar.gz &&
  ./krew-"$(uname | tr '[:upper:]' '[:lower:]')_amd64" install \
    --manifest=krew.yaml --archive=krew.tar.gz
)

# Then append the following to your .zshrc or bashrc
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"

# Then source your shell to pick up the path
source ~/.zshrc # or ~/.bashrc

You can use the kubectl plugin list command to look at all of your plugins.

Test it out to make sure it works.

kubectl krew help

If everything went smoothly you should see some help information and can start working with the plugin manager. For example, if you want to check currently available plugins you can use Krew.

kubectl krew update
kubectl krew search

Or you can browse around the plugin index on GitHub. Once you find a plugin you want to try out, just install it.

kubectl krew install view-utilization

That’s it. Krew should take care of downloading the plugin and putting it in the correct path to make it usable right away.

kubectl view-utilization

Some plugins require additional tools to be installed beforehand as dependencies but should tell you which ones are required when they are installed the first time.

Installing plugin: view-secret
CAVEATS:
\
 |  This plugin needs the following programs:
 |  * jq
/
Installed plugin: view-secret

When you are done with a plugin, you can install it just as easily as it was installed.

kubectl krew uninstall view-secret

Conclusion

I must say I am a really big fan of this new model for managing and creating plugins, and I think it will encourage the community to develop even more tools so I’m looking forward to seeing what people come up with.

Likewise I think Krew is a great fit for this because it is super easy to get installed and started with, which I think is important for gaining widespread adoption in the community. If you have an idea for a Kubectl plugin please consider adding it to the krew-index. The project maintainers are super friendly and are great about feedback and getting things merged.

Read More

Turbocharge your Ansible Playbooks

If you haven’t already discovered Mitogen yet, read on for how to use it (and a few other tricks) to make you Ansible plays a much better experience.

In short, Mitogen is a Python library that (among other things) provides an alternative way to connect to distributed machines using tools like Ansible, Salt and Fabric. And it is fast. Like really fast. Here is a note taken from the Mitogen documentation.

Expect a 1.25x – 7x speedup and a CPU usage reduction of at least 2x, depending on network conditions, modules executed, and time already spent by targets on useful work. Mitogen cannot improve a module once it is executing, it can only ensure the module executes as quickly as possible.

As the documentation says, Mitogen isn’t intended to be used directly but has entrypoints for connecting various tools with its API.

Here is what the sample output might look like with the SSH pipelining and other tweaks configured, not including Mitogen. It clocks in around 120 seconds.

And here is the same run again with Mitogen. The same playbook run is down to around 90 seconds, about a 25% improvement as shown below. The output and few of the other settings are described in more detail below.

mitogen output
better Ansible play output

To set up Mitogen as an Ansible replacement for connecting to hosts, first install it. Note the version. In my own testing, versions earlier than 0.2.5 had some issues.

cd </path/to/install>
curl -OL https://files.pythonhosted.org/packages/source/m/mitogen/mitogen-0.2.5.tar.gz
tar xvzf mitogen-0.2.5.tar.gz

Then modify the anisble.cfg file to point at Mitogen.

[defaults]
strategy_plugins = </path/to/install>/mitogen-0.2.4/ansible_mitogen/plugins/strategy
strategy = mitogen_linear

An option was addin in Mitogen v0.2.4 to disable SSH compression, which can reduce run times in faster networks. The documentation says this option will be default in the future but for now you can turn it on with the following command configuration.

mitogen_ssh_compression = False

NOTE: If you are having trouble with Mitogen and need to turn it off you should also be aware of SSH pipelining. This method of execution isn’t as fast as Mitogen but should at least help bring playbook times down. You can turn it on with the following configuration.

[ssh_connection]
pipelining = True

There are a few other bells and whistles that you can adjust in the anisble.cfg file to help with performance and gain visibility into what is happening.

There is a setting for callback configurations that can be added to ansible.cfg that makes it much easier to see how long things take.

...
# Record some metrics about the Ansible runs
callback_whitelist = timer, profile_tasks
# Better output formatting
stdout_callback = yaml
# Minimal output formatting
#stdout_callback = minimal
callback_plugins = callback_plugins
...

Other settings that can be tuned include some of the defaults like poll_interval, caching and the number of forks to run. I found this blog post to be very helpful in discovering and describing a number of these Ansible tweaks.

Below is a modified ansible.cfg with these settings tuned.

# How often Ansible checks running tasks. The default is set to 15
poll_interval = 5

# Number of processes to fork.  Default is set to 5.
forks = 100

#caching
fact_caching            = jsonfile
fact_caching_connection = .cache/

With these tweaks your Ansible playbooks should run much faster and more cleanly. I highly recommend giving Mitogen a try as well, I have not run into any issues with Mitogen 0.2.3 and it isn’t much effort to add for the amount of gains you get by switching to it. If you know of any other tweaks or settings feel free to let me know!

Read More

Explorando el Mundo de Casino Betfair y las Ventajas del Betfair App

En el mundo de las apuestas en línea, Betfair se destaca como uno de los líderes indiscutibles. Con una amplia gama de servicios que incluyen Betfair casino online y Betfair slots, esta plataforma ofrece una experiencia enriquecedora para todos los jugadores. Hoy exploraremos cómo puedes sacar el máximo provecho de la app de Betfair y disfrutar de todo lo que Casino Betfair tiene para ofrecer.

Apuestas y Casino en la Palma de tu Mano

La Betfair app permite a los usuarios acceder fácilmente a todas las funciones de Betfair desde cualquier lugar. Ya sea que te interese jugar en el Betfair casino o explorar las Slot Betfair, la aplicación te asegura un acceso rápido y seguro.

Betfair casino

¿Cómo Iniciar con el Betfair Login?

El proceso de Betfair login es sencillo. Debes ingresar tu usuario y contraseña desde la página principal o la app. Una vez dentro, el mundo del Casino Betfair está a tus pies.

Una Mirada a las Slots de Betfair

Una de las mayores atracciones del casino en línea son las slots. Las Betfair slots ofrecen variedad y emoción, con múltiples temas y opciones de apuesta. Tanto jugadores novatos como experimentados encontrarán algo a su gusto.

Promociones y Bonos

Betfair regularmente ofrece promociones para nuevos clientes y bonificaciones a los jugadores habituales. Estas ofertas pueden ser en forma de giros gratis o créditos adicionales para las apuestas.

La Seguridad en Betfair

La seguridad es una prioridad en Betfair. La plataforma asegura que las transacciones y datos personales estén protegidos mediante encriptación de alta seguridad. Además, las normas de juego responsable son parte central de la política de Betfair.

Conclusión

El Betfair apuestas y su casino en línea ofrecen una experiencia de entretenimiento completa. Desde un conveniente acceso móvil a través de la app hasta una variedad de juegos de casino, Betfair garantiza diversión y seguridad en un solo lugar.

Read More

Fedezze Fel a TippmixPRO Online Élményét – Tippmixpro app és Bónusz Lehet?ségek

A sportfogadás világában, különösen Magyarországon, a TippmixPRO egy kiemelked? lehet?ség, amely az online fogadók számára kínál egyedi esélyeket és exkluzív bónuszokat. Az alábbi cikkben bemutatjuk, hogy mit kínál a Tippmixpro app és miként lehet a Tippmixpro bónuszok által profitálni.

Tippmixpro app: A Jöv? Sportfogadása

Az okostelefonok korában a fogadás rajongói számára elengedhetetlen egy jól m?köd?, felhasználóbarát alkalmazás. A Tippmixpro app pontosan ezt biztosítja. Felhasználói egyszer?en és gyorsan elérhetik a legfrissebb mérk?zéseket, statisztikákat és odds-okat. Az app intuitív felülete lehet?vé teszi a sima navigációt a különböz? fogadási piacok között.

Bónuszok és Különleges Ajánlatok

Amikor regisztrál a https://tippmixpro-hu.eu.com/ weboldalon, az új játékosok vonzó bónuszokkal találkozhatnak. Ezek a bónuszok ösztönzik a játékosokat arra, hogy gyakrabban és nagyobb tétekkel fogadjanak, ami növeli a nyerési esélyeiket. Az online fogadási platform különféle promóciókkal és kampányokkal tartja fenn a játékosok érdekl?dését.

Online Fogadás Kényelme

A TippmixPRO online platform lehet?vé teszi a játékosok számára, hogy otthonuk kényelméb?l élvezhessék a fogadást. Nincs szükség a fizikális lottózók látogatására, minden egyszer?en elérhet? az interneten keresztül. Az online térben a transzparencia és a gyorsaság ugyanolyan fontosak, mint a megbízhatóság, amit a TippmixPRO garantál.

TippmixPRO Kép

Összegzés

A TippmixPRO online fogadási lehet?ségei számos új és tapasztalt sportfogadó számára nyújtanak izgalmas élményeket. A Tippmixpro app segít maximalizálni a hatékonyságot, míg a Tippmixpro bónuszok lehet?séget adnak arra, hogy még jobban kiélvezhesse a sportfogadások izgalmait. Kezdje meg fogadási kalandját még ma!

Read More

Révélations sur Cresus Casino : Découvrez les bonus et offres incroyables du Cresus Online Casino

Bienvenue dans le monde passionnant du Cresus Casino! Dans cet article, nous allons explorer comment profiter au maximum de Cresus Casino Bonus et découvrir les offres exclusives proposées par ce célèbre site de jeux en ligne.

Pourquoi choisir Cresus Online Casino ?

Cresus Online Casino est réputé pour sa vaste gamme de jeux captivants et ses promotions généreuses. Les joueurs peuvent y trouver aussi bien des machines à sous dernier cri que des tables de jeux classiques comme le blackjack et la roulette. Le site veille à offrir une expérience utilisateur agréable grâce à une interface intuitive et des transactions sécurisées.

Profitez des bonus exclusifs sur Cresus Casino

Le Cresus Casino Bonus est l’une des principales raisons qui attirent tant de joueurs. En tant que nouveau venu, vous pouvez bénéficier d’un bonus de bienvenue alléchant qui boostera vos chances de gagner dès votre arrivée. De plus, Cresus Casino propose régulièrement des promotions pour récompenser la fidélité de ses utilisateurs. Imaginez pouvoir doubler votre mise grâce à un bonus sans dépôt!

Une expérience immersive avec Cresus Casino Online

Cresus Casino Logo

En plus des offres attractives, Cresus Casino Online offre une expérience de jeu immersive avec des graphismes de haute qualité et des effets sonores réalistes. Vous pouvez également profiter de parties en direct avec de vrais croupiers, vous donnant l’impression d’être dans un casino réel sans quitter le confort de chez vous.

En savoir plus en vidéo

Pour ceux qui souhaitent en savoir plus sur les fonctionnalités et les nouveautés du Cresus Online Casino, n’hésitez pas à consulter notre vidéo explicative ci-dessus. Vous y trouverez des astuces et des conseils pour maximiser vos gains.

En conclusion, le Cresus Casino Online est une destination incontournable pour tout amateur de jeux d’argent. Que vous soyez à la recherche de divertissement ou de profits, ce casino en ligne saura répondre à toutes vos attentes!

Read More