K8s Cheat sheet

Search for a command to run...

No comments yet. Be the first to comment.
Elastic Beanstalk is one of the most powerful services powered by AWS for quick deployment and monitoring of your application. It provides a better and easiest way to auto-scale your application and balance workloads. In this article, I am not going ...

Software developers are not only responsible for writing codes, building, and testing applications. They must be responsible for avoiding security risks for the project and the company as a whole. Due to the growing use of the internet, applications,...

I have used Netbeans, Eclipse, STS, and Intellij IDEA but Intellij has been my first choice since my first use. It is one of the best IDE for developing applications. Compared to other IDEs, it provides strong support for autocomplete feature. The de...

At the time of writing this article, there is no official support of Stripe for React-Native. I, having knowledge of backend, was trying to create RESTful endpoints to integrate Stripe payment using Spring boot. Although the documentation of Stripe i...

kubectl run nginx --image=nginx --port=80
kubectl run nginx --image=nginx --port=80 --expose=true
kubectl run nginx --image=nginx --labels="app=web,tier=frontend"
kubectl create deployment nginx --image=nginx
kubectl create deployment nginx --image=nginx --replicas=3
kubectl create deployment nginx --image=nginx --dry-run=client -o yaml > nginx-deploy.yaml
kubectl expose pod redis --port=6379 --name=redis-service
kubectl expose pod redis --port=6379 --name=redis-service --selector="app=redis"
kubectl expose deployment nginx --port=80 --type=ClusterIP
kubectl expose pod nginx --port=80 --type=NodePort
kubectl get pods -l tier=frontend
kubectl get deploy -o wide
kubectl get endpoints redis-service
kubectl label pod nginx app=web
kubectl scale deployment nginx --replicas=5
kubectl edit deployment nginx
kubectl delete pod nginx-xxxx
kubectl set image deployment/myapp-deployment nginx=nginx:1.25
kubectl rollout status deployment/myapp-deployment
kubectl rollout history deployment/myapp-deployment
kubectl rollout history deployment/myapp-deployment --revision=3
kubectl rollout undo deployment/myapp-deployment
kubectl rollout pause deployment/myapp-deployment
kubectl rollout resume deployment/myapp-deployment
kubectl create configmap app-config \
--from-literal=APP_COLOR=blue \
--from-literal=APP_MODE=prod
kubectl create configmap app-config --from-file=application.properties
kubectl create configmap app-config --from-env-file=app.env
kubectl create secret generic app-secret --from-literal=DB_HOST=mysql
kubectl create secret generic app-secret --from-file=application.properties
kubectl auth can-i create deployment
kubectl auth can-i delete nodes
kubectl auth can-i create deployments --as dev-user
kubectl auth can-i create pods -n dev
kubectl auth can-i get pods --as system:serviceaccount:dev:my-sa
kubectl get clusterrole --no-headers | wc -l
# Ingress
kubectl create ingress ingress-test --rule="payment.xyz.com/pay*=pay-service:80" --annotation nginx.ingress.kubernetes.io/rewrite-target=/
# ApiGroups
kubectl api-resources