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: NetworkPolicy | |
metadata: | |
name: test-network-policy | |
namespace: default | |
spec: | |
podSelector: | |
matchLabels: | |
role: db | |
policyTypes: |
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
{ | |
"cniVersion": "0.3.1", | |
"name": "kindnet", | |
"plugins": [ | |
{ | |
"type": "ptp", | |
"ipMasq": false, | |
"ipam": { | |
"type": "host-local", | |
"dataDir": "/run/cni-ipam-state", |
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: autoscaling/v2 | |
kind: HorizontalPodAutoscaler | |
metadata: | |
name: nginx-hpa | |
spec: | |
scaleTargetRef: | |
apiVersion: apps/v1 | |
kind: Deployment | |
name: nginx-deployment | |
minReplicas: 2 |
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
Scanning eBPF helper functions... | |
eBPF helpers supported for program type socket_filter: | |
- bpf_map_lookup_elem | |
- bpf_map_update_elem | |
- bpf_map_delete_elem | |
- bpf_ktime_get_ns | |
- bpf_get_prandom_u32 | |
- bpf_get_smp_processor_id | |
- bpf_tail_call | |
- bpf_perf_event_output |
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: cilium.io/v2 | |
kind: CiliumNetworkPolicy | |
metadata: | |
name: my-app-policy | |
namespace: default | |
spec: | |
endpointSelector: | |
matchLabels: | |
app: my-app | |
ingress: |
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: ConfigMap | |
metadata: | |
name: envoy-config | |
namespace: default | |
data: | |
envoy.yaml: | | |
static_resources: | |
listeners: | |
- name: listener_0 |
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
helm install cilium cilium/cilium --version 1.15.5 --namespace kube-system \ | |
--set global.enabled=true \ | |
--set global.kubernetesServiceHost=<your-k8s-api-server> \ | |
--set global.kubernetesServicePort=<your-k8s-api-port> \ | |
--set global.hubble.enabled=true \ | |
--set global.hubble.metrics.enabled="{dns,drop,tcp,flow,port-distribution,icmp,http}" \ | |
--set global.hubble.ui.enabled=true \ | |
--set global.hubble.relay.enabled=true \ | |
--set global.egressGateway.enabled=true \ | |
--set global.ingressController.enabled=true \ |
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
###################################### | |
######### DISABLING SERVICES ######### | |
###################################### | |
# view running services | |
systemctl | grep running | |
# view state of snapd service | |
systemctl status snapd | |
# stop the snapd service |
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
# use the following lab environment: | |
# https://studyk8s.club/cka-configmaps | |
# create the configmap | |
cat << EOF > redis-configMap.yaml | |
apiVersion: v1 | |
data: | |
redis-config: | | |
maxmemory: 2mb | |
maxmemory-policy: allkeys-lru |
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
# perform the commands from this lab environment: | |
# https://studyk8s.club/cka-logging | |
# create a pod that will output logs to stdout | |
cat << EOF > pod-logging.yaml | |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: pod-logging | |
spec: |
NewerOlder