Skip to content

Instantly share code, notes, and snippets.

View haoa193's full-sized avatar

chenyongqdu haoa193

  • Guangzhou
View GitHub Profile
@haoa193
haoa193 / kubectl-sa-kubeconfig.sh
Created November 9, 2023 09:42 — forked from dwdraju/kubectl-sa-kubeconfig.sh
kubectl generate kubeconfig file for service account
#!/bin/bash
set -e
set -o pipefail
# Add user to k8s using service account, no RBAC (must create RBAC after this script)
if [[ -z "$1" ]] || [[ -z "$2" ]]; then
echo "usage: $0 <service_account_name> <namespace>"
exit 1
fi
@haoa193
haoa193 / Docker-find-dependent-child-image.md
Created September 29, 2017 07:31 — forked from Siva-Charan/Docker-find-dependent-child-image.md
Docker: How to find the dependent child images?

Find the dependent child images on Docker

When you try to remove the docker image with the following command

docker rmi 6795374be8c1

Sometimes you might be facing below error:

Error response from daemon: conflict: unable to delete 6795374be8c1 (cannot be forced) - image has dependent child images

Below is the Docker command line used to find the dependent child images