modified: README.md
This commit is contained in:
1 parent
4e914398fd
commit
060ea17354
1 file changed
+114
-75
@@ -2,80 +2,83 @@
|
|||||||
|
|
||||||
Kubernetes is an open‑source platform that automates the deployment, scaling, and management of containerized applications. It acts as an orchestrator, ensuring your containers run reliably across clusters of machines, handling networking, storage, and updates without downtime.
|
Kubernetes is an open‑source platform that automates the deployment, scaling, and management of containerized applications. It acts as an orchestrator, ensuring your containers run reliably across clusters of machines, handling networking, storage, and updates without downtime.
|
||||||
|
|
||||||
- [Namespaces](#namespaces)
|
- [kubernetes](#kubernetes)
|
||||||
- [Create namespace](#create-namespace)
|
- [Namespaces](#namespaces)
|
||||||
- [namespace stuck on delete](#namespace-stuck-on-delete)
|
- [Create namespace](#create-namespace)
|
||||||
- [Pods](#pods)
|
- [namespace stuck on delete](#namespace-stuck-on-delete)
|
||||||
- [Create an pod](#create-an-pod)
|
- [Pods](#pods)
|
||||||
- [Get Pod](#get-pod)
|
- [Create an pod](#create-an-pod)
|
||||||
- [delete Pod](#delete-pod)
|
- [Get Pod](#get-pod)
|
||||||
- [delete all Failed pods](#delete-all-failed-pods)
|
- [delete Pod](#delete-pod)
|
||||||
- [delete all pods with prefix](#delete-all-pods-with-prefix)
|
- [delete all Failed pods](#delete-all-failed-pods)
|
||||||
- [OOMKilled](#oomkilled)
|
- [delete all pods with prefix](#delete-all-pods-with-prefix)
|
||||||
- [Attach to an pod](#attach-to-an-pod)
|
- [OOMKilled](#oomkilled)
|
||||||
- [Run command on pod](#run-command-on-pod)
|
- [Attach to an pod](#attach-to-an-pod)
|
||||||
- [Container TTY](#container-tty)
|
- [Run command on pod](#run-command-on-pod)
|
||||||
- [Persistent volumes](#persistent-volumes)
|
- [Keep pod Alive](#keep-pod-alive)
|
||||||
- [create PersistentVolumes - host path](#create-persistentvolumes---host-path)
|
- [Persistent volumes](#persistent-volumes)
|
||||||
- [find persistent volume used pvc](#find-persistent-volume-used-pvc)
|
- [create PersistentVolumes - host path](#create-persistentvolumes---host-path)
|
||||||
- [Patch pv - change to retain policy](#patch-pv---change-to-retain-policy)
|
- [find persistent volume used pvc](#find-persistent-volume-used-pvc)
|
||||||
- [Patch pv - remove finalizers](#patch-pv---remove-finalizers)
|
- [Patch pv - change to retain policy](#patch-pv---change-to-retain-policy)
|
||||||
- [check orphans](#check-orphans)
|
- [Patch pv - remove finalizers](#patch-pv---remove-finalizers)
|
||||||
- [persistent volume claims](#persistent-volume-claims)
|
- [check orphans](#check-orphans)
|
||||||
- [Create an pod with PVC](#create-an-pod-with-pvc)
|
- [persistent volume claims](#persistent-volume-claims)
|
||||||
- [kubectl](#kubectl)
|
- [Create an pod with PVC](#create-an-pod-with-pvc)
|
||||||
- [Helper pods](#helper-pods)
|
- [kubectl](#kubectl)
|
||||||
- [network testing](#network-testing)
|
- [Helper pods](#helper-pods)
|
||||||
- [Resources](#resources)
|
- [network testing](#network-testing)
|
||||||
- [Services Accounts](#services-accounts)
|
- [Resources](#resources)
|
||||||
- [Secrets](#secrets)
|
- [Services Accounts](#services-accounts)
|
||||||
- [Manifest - Opaque / Base64](#manifest---opaque--base64)
|
- [configMap](#configmap)
|
||||||
- [Manifest - StringData](#manifest---stringdata)
|
- [Secrets](#secrets)
|
||||||
- [Inline with heredoc and environment variables](#inline-with-heredoc-and-environment-variables)
|
- [Manifest - Opaque / Base64](#manifest---opaque--base64)
|
||||||
- [substr](#substr)
|
- [Manifest - StringData](#manifest---stringdata)
|
||||||
- [annotations](#annotations)
|
- [Inline with heredoc and environment variables](#inline-with-heredoc-and-environment-variables)
|
||||||
- [nodes](#nodes)
|
- [substr](#substr)
|
||||||
- [taints](#taints)
|
- [mounting](#mounting)
|
||||||
- [add taint](#add-taint)
|
- [annotations](#annotations)
|
||||||
- [remove taint](#remove-taint)
|
- [nodes](#nodes)
|
||||||
- [control plane - NoSchedule](#control-plane---noschedule)
|
- [taints](#taints)
|
||||||
- [Official \*.kubernetes.io taints](#official-kubernetesio-taints)
|
- [add taint](#add-taint)
|
||||||
- [cordon](#cordon)
|
- [remove taint](#remove-taint)
|
||||||
- [statefulset](#statefulset)
|
- [control plane - NoSchedule](#control-plane---noschedule)
|
||||||
- [statefulset - Set Replicas](#statefulset---set-replicas)
|
- [Official \*.kubernetes.io taints](#official-kubernetesio-taints)
|
||||||
- [Deployment](#deployment)
|
- [cordon](#cordon)
|
||||||
- [Deployment - Set Replicas](#deployment---set-replicas)
|
- [statefulset](#statefulset)
|
||||||
- [Deployment - rollout restart](#deployment---rollout-restart)
|
- [statefulset - Set Replicas](#statefulset---set-replicas)
|
||||||
- [Daemonset](#daemonset)
|
- [Deployment](#deployment)
|
||||||
- [Daemonset - rollout restart](#daemonset---rollout-restart)
|
- [Deployment - Set Replicas](#deployment---set-replicas)
|
||||||
- [services](#services)
|
- [Deployment - rollout restart](#deployment---rollout-restart)
|
||||||
- [certs](#certs)
|
- [Daemonset](#daemonset)
|
||||||
- [list all certs](#list-all-certs)
|
- [Daemonset - rollout restart](#daemonset---rollout-restart)
|
||||||
- [get cert end date](#get-cert-end-date)
|
- [services](#services)
|
||||||
- [service accounts](#service-accounts)
|
- [certs](#certs)
|
||||||
- [Services DNS Name](#services-dns-name)
|
- [list all certs](#list-all-certs)
|
||||||
- [core-dns](#core-dns)
|
- [get cert end date](#get-cert-end-date)
|
||||||
- [Overrides](#overrides)
|
- [service accounts](#service-accounts)
|
||||||
- [Remove warning from logs](#remove-warning-from-logs)
|
- [Services DNS Name](#services-dns-name)
|
||||||
- [Custom Resource Definitions](#custom-resource-definitions)
|
- [core-dns](#core-dns)
|
||||||
- [k3s](#k3s)
|
- [Overrides](#overrides)
|
||||||
- [Install / Setup](#install--setup)
|
- [Remove warning from logs](#remove-warning-from-logs)
|
||||||
- [prune old images](#prune-old-images)
|
- [Custom Resource Definitions](#custom-resource-definitions)
|
||||||
- [kill all](#kill-all)
|
- [k3s](#k3s)
|
||||||
- [Prune ephemeral containerd data](#prune-ephemeral-containerd-data)
|
- [Install / Setup](#install--setup)
|
||||||
- [check system logs](#check-system-logs)
|
- [prune old images](#prune-old-images)
|
||||||
- [Workarounds \& Fixes](#workarounds--fixes)
|
- [kill all](#kill-all)
|
||||||
- [Failed unmounting var-lib-rancher.mount on reboot](#failed-unmounting-var-lib-ranchermount-on-reboot)
|
- [Prune ephemeral containerd data](#prune-ephemeral-containerd-data)
|
||||||
- [klipper-lb](#klipper-lb)
|
- [check system logs](#check-system-logs)
|
||||||
- [troubleshooting](#troubleshooting)
|
- [Workarounds \& Fixes](#workarounds--fixes)
|
||||||
- [Containerd state](#containerd-state)
|
- [Failed unmounting var-lib-rancher.mount on reboot](#failed-unmounting-var-lib-ranchermount-on-reboot)
|
||||||
- [host cli](#host-cli)
|
- [klipper-lb](#klipper-lb)
|
||||||
- [host cli - check port usage](#host-cli---check-port-usage)
|
- [troubleshooting](#troubleshooting)
|
||||||
- [kill all connections](#kill-all-connections)
|
- [Containerd state](#containerd-state)
|
||||||
- [cert-manager](#cert-manager)
|
- [host cli](#host-cli)
|
||||||
- [Removing cert‑manager Metadata from Secrets](#removing-certmanager-metadata-from-secrets)
|
- [host cli - check port usage](#host-cli---check-port-usage)
|
||||||
- [hosting](#hosting)
|
- [kill all connections](#kill-all-connections)
|
||||||
- [misc](#misc)
|
- [cert-manager](#cert-manager)
|
||||||
|
- [Removing cert‑manager Metadata from Secrets](#removing-certmanager-metadata-from-secrets)
|
||||||
|
- [hosting](#hosting)
|
||||||
|
- [misc](#misc)
|
||||||
|
|
||||||
## Namespaces
|
## Namespaces
|
||||||
|
|
||||||
@@ -336,7 +339,11 @@ POD_NAME=$(kubectl get pod -l app=$MY_APP_NAME -n $NAMESPACE -o jsonpath='{.item
|
|||||||
kubectl exec -n $NAMESPACE -it ${POD_NAME} -- sh
|
kubectl exec -n $NAMESPACE -it ${POD_NAME} -- sh
|
||||||
```
|
```
|
||||||
|
|
||||||
### Container TTY
|
### Keep pod Alive
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
command: ["tail", "-f", "/dev/null"]
|
||||||
|
```
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
...
|
...
|
||||||
@@ -582,6 +589,20 @@ kubectl get secret <secret_name> -o jsonpath='{.data.token}' | base64 -d > ./ser
|
|||||||
kubectl config view --raw -o jsonpath='{.clusters[0].cluster.certificate-authority-data}'
|
kubectl config view --raw -o jsonpath='{.clusters[0].cluster.certificate-authority-data}'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## configMap
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: my-config
|
||||||
|
data:
|
||||||
|
app.conf: |
|
||||||
|
key=value
|
||||||
|
nested/file.txt: |
|
||||||
|
hello
|
||||||
|
```
|
||||||
|
|
||||||
## Secrets
|
## Secrets
|
||||||
|
|
||||||
### Manifest - Opaque / Base64
|
### Manifest - Opaque / Base64
|
||||||
@@ -659,6 +680,24 @@ envsubst < ./secret.yaml | kubectl apply -f -
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### mounting
|
||||||
|
|
||||||
|
``` yaml
|
||||||
|
|
||||||
|
volumeMounts:
|
||||||
|
- name: secret-name
|
||||||
|
mountPath: /secret
|
||||||
|
subPath: mySecret
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: secret-name
|
||||||
|
secret:
|
||||||
|
secretName: secret-name
|
||||||
|
# required if secret is ah ssh identity
|
||||||
|
# defaultMode: 0400
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
## annotations
|
## annotations
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
|
|||||||
Reference in new issue
Block a user