LinuxAacademyK8s Flashcards
PASS CKA MOTHERFUCKER
run a nginx deployment
kubectl run nginx –image=nginx
view deployments in cluster
kubectl get deployments
use portforwarding to access a pod directly
kubectl port-forward $pod_name 8081:80
get a response directly from pod
curl –head http:127.0.0.1:8081
view logs from pod
kubectl logs $pod_name
run a command directly from container.. like ssh..
getting the version
kubect. exec -it $pod_name – nginx -v
get a response from SERVICE
curl -I localhost:$node_port
perform tests to
ensure operability of cluster
kubeadm only cares about
bootstrapping NOT provisioning clusters
kubeadm is a built tool to provide
kubeadm init and kubeadm join as best-practice “fast paths” for creating Kubernetes clusters.
kubeadm performs the actions necessary to
get a minimum viable cluster up and running
generate new token
sudo kubeadm token generate
view the containers in the pod
docker ps
Get the services YAML output for all the services in your cluster:
kubectl get servers -o yaml
view list of endpoints
kubectl get endpoints