Skip to content

Latest commit

 

History

History
75 lines (42 loc) · 3.72 KB

a.cluster-Architecture-Installation-Configuration.md

File metadata and controls

75 lines (42 loc) · 3.72 KB

Cluster Architecture, Installation & Configuration (20%)

  • Manage role based access control (RBAC)
  • Use Kubeadm to install a basic cluster
  • Manage a highly-available Kubernetes cluster
  • Provision underlying infrastructure to deploy a Kubernetes cluster
  • Perform a version upgrade on a Kubernetes cluster using Kubeadm
  • Implement etcd backup and restore

Set the context and the namespace.

A "Context" is a combination of a cluster, user, and namespace. It is a way to specify the cluster you want to interact with, the user or authentication credentials you want to use, and the default namespace for that user. Setting a context is important because it helps you manage multiple Kubernetes clusters and switch between them easily.

Use Cases: Multi-cluster Management, User and Authentication, isolate and organize resources, simplifies command-line operations.

Hint: Don't change the namespace, change the context as per the question. If there is a namespace add -n namespace to lessen the risk of error. Set context before each question using the kubectl config command, and switch between contexts using kubectl config use-context.

Helpful commands:

# Display addresses of the master and services
kubectl cluster-info

# Dump current cluster state to stdout
kubectl cluster-info dump

# List the nodes
kubectl get nodes

# Show metrics for a given node
kubectl top node my-node

# List all pods in all namespaces, with more details
kubectl get pods -o wide --all-namespaces

# List all services in all namespaces, with more details
kubectl get svc  -o wide --all-namespaces