Skip to content

Instantly share code, notes, and snippets.

View antonputra's full-sized avatar
🎯
Focusing

Anton Putra antonputra

🎯
Focusing
View GitHub Profile
@antonputra
antonputra / manifests.tf
Created August 15, 2023 21:23
How to apply MULTIPLE Kubernetes manifests using Terraform?
# Install kubectl provider
terraform {
required_version = ">= 0.13"
required_providers {
kubectl = {
source = "gavinbunney/kubectl"
version = ">= 1.14.0"
}
}
# This will use osd.5 as an example
# ceph commands are expected to be run in the rook-toolbox
1) disk fails
2) remove disk from node
3) mark out osd. `ceph osd out osd.5`
4) remove from crush map. `ceph osd crush remove osd.5`
5) delete caps. `ceph auth del osd.5`
6) remove osd. `ceph osd rm osd.5`
7) delete the deployment `kubectl delete deployment -n rook-ceph rook-ceph-osd-id-5`
8) delete osd data dir on node `rm -rf /var/lib/rook/osd5`
@antonputra
antonputra / k8s-offline.md
Last active February 12, 2023 10:07
Offline Kubernetes installation with kubeadm and CentOS 7 v1.10.5

On master and nodes

Set environment variables

export MASTER01=<user>@<server>:<path>/<to>/<remote>/<folder>

Install docker daemon | 17.03 version recommended with k8s v.1.10.5