modified: README.md
This commit is contained in:
1 parent
4e914398fd
commit
060ea17354
1 file changed
+62
-23
@@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
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)
|
||||||
|
- [Namespaces](#namespaces)
|
||||||
- [Create namespace](#create-namespace)
|
- [Create namespace](#create-namespace)
|
||||||
- [namespace stuck on delete](#namespace-stuck-on-delete)
|
- [namespace stuck on delete](#namespace-stuck-on-delete)
|
||||||
- [Pods](#pods)
|
- [Pods](#pods)
|
||||||
- [Create an pod](#create-an-pod)
|
- [Create an pod](#create-an-pod)
|
||||||
- [Get Pod](#get-pod)
|
- [Get Pod](#get-pod)
|
||||||
- [delete Pod](#delete-pod)
|
- [delete Pod](#delete-pod)
|
||||||
@@ -14,8 +15,8 @@ Kubernetes is an open‑source platform that automates the deployment, scaling,
|
|||||||
- [OOMKilled](#oomkilled)
|
- [OOMKilled](#oomkilled)
|
||||||
- [Attach to an pod](#attach-to-an-pod)
|
- [Attach to an pod](#attach-to-an-pod)
|
||||||
- [Run command on pod](#run-command-on-pod)
|
- [Run command on pod](#run-command-on-pod)
|
||||||
- [Container TTY](#container-tty)
|
- [Keep pod Alive](#keep-pod-alive)
|
||||||
- [Persistent volumes](#persistent-volumes)
|
- [Persistent volumes](#persistent-volumes)
|
||||||
- [create PersistentVolumes - host path](#create-persistentvolumes---host-path)
|
- [create PersistentVolumes - host path](#create-persistentvolumes---host-path)
|
||||||
- [find persistent volume used pvc](#find-persistent-volume-used-pvc)
|
- [find persistent volume used pvc](#find-persistent-volume-used-pvc)
|
||||||
- [Patch pv - change to retain policy](#patch-pv---change-to-retain-policy)
|
- [Patch pv - change to retain policy](#patch-pv---change-to-retain-policy)
|
||||||
@@ -23,42 +24,44 @@ Kubernetes is an open‑source platform that automates the deployment, scaling,
|
|||||||
- [check orphans](#check-orphans)
|
- [check orphans](#check-orphans)
|
||||||
- [persistent volume claims](#persistent-volume-claims)
|
- [persistent volume claims](#persistent-volume-claims)
|
||||||
- [Create an pod with PVC](#create-an-pod-with-pvc)
|
- [Create an pod with PVC](#create-an-pod-with-pvc)
|
||||||
- [kubectl](#kubectl)
|
- [kubectl](#kubectl)
|
||||||
- [Helper pods](#helper-pods)
|
- [Helper pods](#helper-pods)
|
||||||
- [network testing](#network-testing)
|
- [network testing](#network-testing)
|
||||||
- [Resources](#resources)
|
- [Resources](#resources)
|
||||||
- [Services Accounts](#services-accounts)
|
- [Services Accounts](#services-accounts)
|
||||||
- [Secrets](#secrets)
|
- [configMap](#configmap)
|
||||||
|
- [Secrets](#secrets)
|
||||||
- [Manifest - Opaque / Base64](#manifest---opaque--base64)
|
- [Manifest - Opaque / Base64](#manifest---opaque--base64)
|
||||||
- [Manifest - StringData](#manifest---stringdata)
|
- [Manifest - StringData](#manifest---stringdata)
|
||||||
- [Inline with heredoc and environment variables](#inline-with-heredoc-and-environment-variables)
|
- [Inline with heredoc and environment variables](#inline-with-heredoc-and-environment-variables)
|
||||||
- [substr](#substr)
|
- [substr](#substr)
|
||||||
- [annotations](#annotations)
|
- [mounting](#mounting)
|
||||||
- [nodes](#nodes)
|
- [annotations](#annotations)
|
||||||
- [taints](#taints)
|
- [nodes](#nodes)
|
||||||
|
- [taints](#taints)
|
||||||
- [add taint](#add-taint)
|
- [add taint](#add-taint)
|
||||||
- [remove taint](#remove-taint)
|
- [remove taint](#remove-taint)
|
||||||
- [control plane - NoSchedule](#control-plane---noschedule)
|
- [control plane - NoSchedule](#control-plane---noschedule)
|
||||||
- [Official \*.kubernetes.io taints](#official-kubernetesio-taints)
|
- [Official \*.kubernetes.io taints](#official-kubernetesio-taints)
|
||||||
- [cordon](#cordon)
|
- [cordon](#cordon)
|
||||||
- [statefulset](#statefulset)
|
- [statefulset](#statefulset)
|
||||||
- [statefulset - Set Replicas](#statefulset---set-replicas)
|
- [statefulset - Set Replicas](#statefulset---set-replicas)
|
||||||
- [Deployment](#deployment)
|
- [Deployment](#deployment)
|
||||||
- [Deployment - Set Replicas](#deployment---set-replicas)
|
- [Deployment - Set Replicas](#deployment---set-replicas)
|
||||||
- [Deployment - rollout restart](#deployment---rollout-restart)
|
- [Deployment - rollout restart](#deployment---rollout-restart)
|
||||||
- [Daemonset](#daemonset)
|
- [Daemonset](#daemonset)
|
||||||
- [Daemonset - rollout restart](#daemonset---rollout-restart)
|
- [Daemonset - rollout restart](#daemonset---rollout-restart)
|
||||||
- [services](#services)
|
- [services](#services)
|
||||||
- [certs](#certs)
|
- [certs](#certs)
|
||||||
- [list all certs](#list-all-certs)
|
- [list all certs](#list-all-certs)
|
||||||
- [get cert end date](#get-cert-end-date)
|
- [get cert end date](#get-cert-end-date)
|
||||||
- [service accounts](#service-accounts)
|
- [service accounts](#service-accounts)
|
||||||
- [Services DNS Name](#services-dns-name)
|
- [Services DNS Name](#services-dns-name)
|
||||||
- [core-dns](#core-dns)
|
- [core-dns](#core-dns)
|
||||||
- [Overrides](#overrides)
|
- [Overrides](#overrides)
|
||||||
- [Remove warning from logs](#remove-warning-from-logs)
|
- [Remove warning from logs](#remove-warning-from-logs)
|
||||||
- [Custom Resource Definitions](#custom-resource-definitions)
|
- [Custom Resource Definitions](#custom-resource-definitions)
|
||||||
- [k3s](#k3s)
|
- [k3s](#k3s)
|
||||||
- [Install / Setup](#install--setup)
|
- [Install / Setup](#install--setup)
|
||||||
- [prune old images](#prune-old-images)
|
- [prune old images](#prune-old-images)
|
||||||
- [kill all](#kill-all)
|
- [kill all](#kill-all)
|
||||||
@@ -69,12 +72,12 @@ Kubernetes is an open‑source platform that automates the deployment, scaling,
|
|||||||
- [klipper-lb](#klipper-lb)
|
- [klipper-lb](#klipper-lb)
|
||||||
- [troubleshooting](#troubleshooting)
|
- [troubleshooting](#troubleshooting)
|
||||||
- [Containerd state](#containerd-state)
|
- [Containerd state](#containerd-state)
|
||||||
- [host cli](#host-cli)
|
- [host cli](#host-cli)
|
||||||
- [host cli - check port usage](#host-cli---check-port-usage)
|
- [host cli - check port usage](#host-cli---check-port-usage)
|
||||||
- [kill all connections](#kill-all-connections)
|
- [kill all connections](#kill-all-connections)
|
||||||
- [cert-manager](#cert-manager)
|
- [cert-manager](#cert-manager)
|
||||||
- [Removing cert‑manager Metadata from Secrets](#removing-certmanager-metadata-from-secrets)
|
- [Removing cert‑manager Metadata from Secrets](#removing-certmanager-metadata-from-secrets)
|
||||||
- [hosting](#hosting)
|
- [hosting](#hosting)
|
||||||
- [misc](#misc)
|
- [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