Skip to content

Instantly share code, notes, and snippets.

View allanger's full-sized avatar

Nikolai Rodionov allanger

View GitHub Profile
@allanger
allanger / .zshrc
Last active May 12, 2022 16:13
ZSH function to decode k8s secrets
# ------------------------------------
# -- Kubernetes reveal secrets
# ------------------------------------
# -- Just an alias
# ------------------------------------
alias krs="k8s_reveal_secret"
# ------------------------------------
# -- Internal function for generating
# -- the "$KEY: $VALUE" string
# ------------------------------------
@allanger
allanger / Add Kubernetes roles.md
Last active November 15, 2023 11:39
Add Kubernetes users with Ansible

Add Kubernetes users with Ansible

Hi! In the previous article, I've told how to deploy k8s cluster with ansible. Now I'm going to tell, how to add users to your cluster to be able to control your k8s remotely.

My Github: https://github.com/allanger/kubernetes-rbac-ansible-role

Let's imagine you've deployed a bare-metal cluster and you ssh to the master node every time you wanna do something with it. It's not cool, right? So you need to add a user to your cluster.

You can do it manually but, I think, after the first time you perform it, you'd like to do it automatically. That's why I've created this Ansible role.

@allanger
allanger / Deploy_Kubernetes.md
Last active April 23, 2024 17:56
Deploy Kubernetes with Ansible

Deploy Kubernetes with Ansible

Requirements

We will need at least two nodes, Ansible, and a kubectl. That's enough to begin.

My ansible role: https://github.com/allanger/kubeadm-ansible-role

I am using Ubuntu 21.04 on all my servers so my Ansible role is written for Debian-based distros. (I will be happy if anybody adds support for other distros)

Preparing system