-
Notifications
You must be signed in to change notification settings - Fork 0
/
kubernetes
58 lines (42 loc) · 1.78 KB
/
kubernetes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
kubectl config current-context
kubectl get namespace
kubectl get all --all-namespaces
kubectl get all
kubectl get node
kubectl get pod
kubectl get svc
kubectl get secrets
kubectl get events
kubectl get storageclasses
# pod details
kubectl get pod -o wide
kubectl get node -o wide
# pod waiting
sudo kubectl get pods -w
kubectl rollout restart deployment py-app
kubectl port-forward svc/argocd-server -n argocd 8080:443
kubectl describe svc {svc-name}
kubectl describe pod {pod-name}
kubectl logs {pod-name}
kubectl logs coredns-854c77959c-pm5hj -f
kubectl delete svc service-name
eksctl delete cluster --name my-cluster
kubectl delete deploy my-nginx
kubectl expose deployment hello-world --type=NodePort --name=example-service
kubectl exec -it mongo-deployment-dffb86cd5-nschp mongosh
kubectl apply -f client.yaml
aws ecr get-login-password --region ap-south-1
$TOKEN= PW
kubectl create namespace devops
kubectl create secret docker-registry glue --docker-server=account_id.dkr.ecr.ap-south-1.amazon36aws.com --docker-username=AWS --docker-password=$TOKEN
kubectl create deployment nginx-deploy --image=nginx --replicas=4
kubectl run ubuntu-demo --image=ubuntu:latest --command -- sleep 3600
sudo kubectl exec -it ubuntu-demo -- /bin/bash
sudo kubectl -n kube-system rollout restart deployment coredns
kubectl drain --ignore-daemonsets ip-172-31-61-162<node name / ip>
kubectl uncordon ip-172-31-41-21 <node name / ip>
kubectl taint nodes ip-172-31-5-4 dedicated=special-user:NoSchedule
kubectl taint nodes --all node-role.kubernetes.io/control-plane-
POD_NAME="$(kubectl get pod -l app.kubernetes.io/name=grafana -o jsonpath='{.items[0].metadata.name}')" kubectl --namespace default port-forward $POD_NAME 3000
Kevin Friedman
kubectl set image deployment/server server=bjnandi/ci-cd-mern-k3s-backend:v1.0.1