Skip to content

Instantly share code, notes, and snippets.

View alexchiri's full-sized avatar

Alexandru (Alex) Chirițescu alexchiri

View GitHub Profile
@alexchiri
alexchiri / jenkins-x-walkthrough.md
Last active October 18, 2019 09:08
All the commands and links of the Jenkins X walkthrough
  1. Official website of the Jenkins X project: Jenkins X. You can find here more information about the Jenkins X components. And I found this article about Prow to be quite good to get a better understanding about the different native Kubernetes CI/CD projects.

  2. Create a new cluster using jx and minikube:

jx create cluster minikube --kubernetes-version=v1.15.4

Specify kubernetes version until this issue is fixed. Specify more resources to make sure the initial pipelines can succeed:

{"log":"+ grep -q cloud-provider=azure\n","stream":"stderr","time":"2019-12-01T13:58:36.770044437Z"}
{"log":"+ echo kube-apiserver --proxy-client-key-file=/etc/kubernetes/ssl/kube-apiserver-proxy-client-key.pem --requestheader-client-ca-file=/etc/kubernetes/ssl/kube-apiserver-requestheader-ca.pem --tls-cert-file=/etc/kubernetes/ssl/kube-apiserver.pem --requestheader-username-headers=X-Remote-User --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem --advertise-address=172.31.26.30 --kubelet-client-key=/etc/kubernetes/ssl/kube-apiserver-key.pem --authorization-mode=Node,RBAC --requestheader-allowed-names=kube-apiserver-proxy-client --requestheader-group-headers=X-Remote-Group --runtime-config=authorization.k8s.io/v1beta1=true --tls-cipher-suites=TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 --kubelet-preferred-address-types=Interna
@alexchiri
alexchiri / k8s-maintenance.md
Created December 15, 2019 18:52
K8s maintenance stuff

This is super cool and useful: https://medium.com/faun/kubectl-commands-cheatsheet-43ce8f13adfb Tips & tricks: https://hackernoon.com/top-10-kubernetes-tips-and-tricks-27528c2d0222 Configure bash complete: echo "source <(kubectl completion bash)" >> ~/.bashrc

kubectl get pods --all-namespaces -o custom-columns=NAME:.metadata.name,NAMESPACE:.metadata.namespace,QOS-CLASS:.status.qosClass

etcd guides:

https://github.com/etcd-io/etcd/blob/master/Documentation/op-guide/hardware.md#example-hardware-configurations https://github.com/etcd-io/etcd/blob/master/Documentation/op-guide/hardware.md#cpus

@alexchiri
alexchiri / install-jx-eks-tooling.sh
Last active April 16, 2020 18:48
Script to install all the dependencies (and more) you would need to use Jenkins X on Ubuntu.
#!/bin/bash
sudo apt-get update && sudo apt-get install -y jq curl unzip git python3 apt-transport-https ca-certificates software-properties-common jid ruby-full pkg-config
export KUBECTL_VERSION="v1.15.10"
export HELM_VERSION="v2.16.1"
export EKSCTL_VERSION="0.11.1"
export JX_VERSION="v2.0.1249"
# install kubectl

What is Jenkins X?

Not a simple answer to the question:

Requirements for going through all these steps:

  • A free GitHub organization with 2 free users (one will approve PRs and the other is a bot user used by the pipelines) OR just 2 free users (one will approve PRs and the other is a bot user used bythe pipelines)
@alexchiri
alexchiri / what-and-why-is-there-kubernetes.md
Last active April 18, 2020 17:29
A short and high level presentation about what and why is there Kubernetes
@alexchiri
alexchiri / get-started-with-kind-in-wsl2-installation-instructions.md
Last active January 11, 2025 20:50
Get started with kind in WSL2 - installation instructions

Create a multi-node kind cluster and with a different kubernetes version than default

The instructions in this tutorial are not WSL2 specific, but if you would like to see how to get started with kind in WSL2 (and afterwards follow along with this tutorial), do have a look at this video.

How to create a local multi-node Kubernetes cluster with kind

In order to create a multi-node cluster with kind, we need to create a configuration file. Let's say we want to create a 3 node cluster, 1 control-plane and 2 workers, we would then create the following configuration file (you can save it as kind-config.yaml):

kind: Cluster
@alexchiri
alexchiri / settings.json
Created October 15, 2020 19:22
Windows Terminal settings
// This file was initially generated by Windows Terminal (Preview) 1.0.1402.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",