Skip to content

Instantly share code, notes, and snippets.

View rosskirkpat's full-sized avatar

Ross Kirkpatrick rosskirkpat

View GitHub Profile
@rosskirkpat
rosskirkpat / rancher-k3s-rke-rke2-max-pods.md
Created October 13, 2022 01:31
Configure max pods for RKE, RKE2, and k3s clusters

How to configure max pods for the SUSE Rancher Kubernetes distributions

Considerations when Increasing the Max Pod Count

Changing the max-pods on an active cluster with workloads is generally a safe procedure when target number of max-pods is <=250. When the goal number of max-pods is >250, the additional considerations mentioned above require a deletion of all currently running pods.

If increasing max-pods to >250, there are additional considerations and changes required. The in-cluster IP management configuration needs to be modified as the default is a /16 split into one /24 for each node in the cluster. This comes to a limit of about 256 nodes with roughly 253 pods per node.

--max-pods int32 Default: 110
@rosskirkpat
rosskirkpat / rke2-windows-debug-commands.md
Created October 13, 2022 01:29
RKE2 Windows and Linux Troubleshooting and Debugging

RKE2 Windows Troubleshooting

High Level Notes

  • For any and all RKE2 Windows Clusters, v1.22.x or higher of RKE2 needs to be used. This is due to a Calico 3.19.x bug in v1.21.x of RKE2 that Tigera will not backport.
  • The minor version of Calico was changed midway through the RKE2 v1.22 lifecycle.
    • rke2 v1.22.3+rke2r1 through v1.22.6+rke2r1 have Calico 3.20.x (3.20.1 for v1.22.3+rke2r1 only and then 3.20.2 until v1.22.7+rke2r1)
    • rke2 v1.22.7+rke2r1 and up have Calico 3.21.4 (or higher)
@rosskirkpat
rosskirkpat / push-tag.sh
Created August 16, 2022 17:10
bash: how to re-push a git tag that has already been published
#!/bin/bash
# set your TAG as a variable to avoid typos
TAG=v2.6.7
REPO=rancher/cli
# checkout v2.6 (main) branch
git clone https://github.com/$REPO.git
cd ${REPO#*/}
#!/bin/bash
#
# Copyright 2011, Tim Branyen @tbranyen <tim@tabdeveloper.com>
# Dual licensed under the MIT and GPL licenses.
#
# Automatically clone single or multiple repos into a folder,
# great for setting up a git projects folder.
#
# Install: curl https://gist.github.com/raw/902154/github.sh > /usr/local/bin/gh
# chmod +x /usr/local/bin/gh
Invoke-WebRequest -useb https://github.com/containernetworking/plugins/releases/download/v0.9.1/cni-plugins-windows-amd64-v0.9.1.tgz -OutFile c:\opt\cni\bin\cni-plugins.tgz
$sourceVipJson = [io.Path]::Combine($Global:BaseDir, "sourceVip.json")
$sourceVipRequest = [io.Path]::Combine($Global:BaseDir, "sourceVipRequest.json")
$hnsNetwork = Get-HnsNetwork | ? Name -EQ flannel.4096
$subnet = $hnsNetwork.Subnets[0].AddressPrefix