This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: v1 | |
| kind: Pod | |
| meta | |
| name: data-processor | |
| namespace: production | |
| spec: | |
| containers: | |
| - name: data-processor | |
| image: nginx:1.25 | |
| resources: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # metrics server install | |
| kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.8.0/components.yaml | |
| # patch it to allow insecure connections (required for kind) | |
| kubectl patch -n kube-system deployment metrics-server --type=json \ | |
| -p '[{"op":"add","path":"/spec/template/spec/containers/0/args/-","value":"--kubelet-insecure-tls"}]' | |
| # verify it's running | |
| kubectl top pod |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: networking.k8s.io/v1 | |
| kind: Ingress | |
| metadata: | |
| name: demo-ingress | |
| annotations: | |
| nginx.ingress.kubernetes.io/rewrite-target: / | |
| spec: | |
| ingressClassName: nginx | |
| rules: | |
| - http: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: apps/v1 | |
| kind: DaemonSet | |
| metadata: | |
| name: node-logger | |
| spec: | |
| selector: | |
| matchLabels: | |
| app: node-logger | |
| template: | |
| metadata: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: gateway.networking.k8s.io/v1 | |
| kind: HTTPRoute | |
| metadata: | |
| name: web-route | |
| namespace: default | |
| spec: | |
| parentRefs: | |
| - name: prod-gateway | |
| namespace: infra | |
| hostnames: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: networking.k8s.io/v1 | |
| kind: Ingress | |
| metadata: | |
| name: web-ingress | |
| annotations: | |
| nginx.ingress.kubernetes.io/rewrite-target: / | |
| spec: | |
| ingressClassName: nginx | |
| rules: | |
| - host: myapp.example.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo kubeadm init \ | |
| --pod-network-cidr=192.168.0.0/16 \ | |
| --kubernetes-version=stable | |
| kubectl apply -f https://raw.githubusercontent.com/projectcalico/calico/v3.28.0/manifests/calico.yaml | |
| apt update && apt install -y bash-completion | |
| echo 'source <(kubectl completion bash)' >> ~/.bashrc | |
| echo 'source /usr/share/bash-completion/bash_completion' >> ~/.bashrc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: v1 | |
| kind: Pod | |
| metadata: | |
| name: my-pod | |
| namespace: default | |
| spec: | |
| tolerations: | |
| - key: "node-role.kubernetes.io/control-plane" | |
| operator: "Exists" | |
| effect: "NoSchedule" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: v1 | |
| kind: Pod | |
| metadata: | |
| name: memory-hog | |
| spec: | |
| containers: | |
| - name: stress | |
| image: alexeiled/stress-ng | |
| args: | |
| - --vm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| labels: | |
| k8s-app: kube-dns | |
| kubernetes.io/cluster-service: "true" | |
| kubernetes.io/name: CoreDNS | |
| name: kube-dns | |
| namespace: kube-system | |
| spec: |
NewerOlder