Skip to content

Instantly share code, notes, and snippets.

Installing metrics and Kubernetes dashboard on Kind

Install Metrics Server:

  1. Install latest metrics server:
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml

Adding Support for Management Policies (a.k.a Observe Only) in a Native Provider

(Re)generating a provider with Management Policies

Check out the provider repo, e.g., crossplane-contrib/provider-gcp, and go to the project directory on your local machine.

  1. Generate with management policy and update crossplane-runtime dependency:

@turkenh
turkenh / config.md
Last active October 12, 2021 17:33
provider-kafka-development-environment

Create at ~/.kaf/config

current-cluster: local
clusteroverride: ""
clusters:
- name: local
  version: ""
  brokers:
 - kafka-dev-0.kafka-dev-headless:9092
==> Bash debug is on
==> Detected data from previous deployments...
https://etcd-cluster-0.etcd-cluster-headless.etcd-system.svc.cluster.local:2379 is healthy: successfully committed proposal: took = 14.816755ms
https://etcd-cluster-1.etcd-cluster-headless.etcd-system.svc.cluster.local:2379 is healthy: successfully committed proposal: took = 13.129666ms
grep: /bitnami/etcd/member_removal.log: No such file or directory
==> Updating member in existing cluster...
Member 3399487d12010a3d updated in cluster f0e41ec3893d5d2a
2020-02-11 08:57:35.148890 I | pkg/flags: recognized and used environment variable ETCD_ADVERTISE_CLIENT_URLS=https://etcd-cluster-2.etcd-cluster-headless.etcd-system.svc.cluster.local:2379
2020-02-11 08:57:35.148965 I | pkg/flags: recognized and used environment variable ETCD_CERT_FILE=/opt/bitnami/etcd/certs/client/cert.pem
2020-02-11 08:57:35.148975 I | pkg/flags: recognized and used environment variable ETCD_CLIENT_CERT_AUTH=true
@turkenh
turkenh / .zshrc
Created July 28, 2019 22:44
My zsh config
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/hasanturken/.oh-my-zsh"
ZSH_THEME=agnoster
plugins=(kube-ps1 git osx docker git-extras git-flow colored-man-pages z kubectl zsh-autosuggestions)
@turkenh
turkenh / extend_root.sh
Created October 23, 2018 07:49
Attach and extend root volume - ubuntu 14.04
# Create and attach a disk with alias, say "ht"
vgdisplay # Get vgname, i.e. "packer-ubuntu14-vg"
vgextend packer-ubuntu14-vg /dev/ht
# for a disk of 256G size
lvextend -r -L+255G /dev/packer-ubuntu14-vg/root
@turkenh
turkenh / run-local-k8s-dashboard.sh
Created October 11, 2018 07:23
Run a local kubernetes dashboard for remote kubernetes cluster
#!/usr/bin/env bash
KUBECONFIG=${KUBECONFIG:-"$HOME/.kube/config"}
docker run -v "${KUBECONFIG}":/tmp/config -p 8443:8443 k8s.gcr.io/kubernetes-dashboard-amd64:v1.10.0 \
--auto-generate-certificates --kubeconfig=/tmp/config --disable-skip
@turkenh
turkenh / debug-docker.yaml
Created July 9, 2018 19:53
Kubernetes Pod to debug docker of the Node
apiVersion: v1
kind: Pod
metadata:
name: debug-docker
spec:
nodeSelector:
kubernetes.io/hostname: <nodename>
containers:
- name: dind
image: docker:stable