Git Product home page Git Product logo

kubernetes-example's Introduction

Kubectl Example Commands

kubectl get pods
kubectl get deployment
kubectl create deployment nginx-depl --image=nginx
kubectl get replicaset
kubectl edit deployment nginx-depl
kubectl logs "pod name"
kubectl describe pod "pod name"
kubectl exec -it "pod name" -- bin/bash
kubectl delete deployment "deployment name"
kubectl apply -f config-file.yaml
kubectl get deployment nginx-deployment2 -o yaml
kubectl delete --all <pods,deployments,services.. etc>
kubectl get secret
kubectl get pod --watch
kubectl get pod -o wide
kubectl get all | grep mongodb
minikube service mongo-express-service
kubectl get namespace
kubectl create namespace my-namespace
kubectl get configmap -o yaml (namespace info)
kubectl apply -f mysql-configmap.yaml --namespace=my-namespace (or define inse the metadata attribute in yaml files.)
minikube service go-backend-service --url (for service url)

Kubernetes Namespaces Notes

1-) Structure components
2-) Avoid conflicts between teams
3-) Share services between different environments
4-) Access and Resource Limits on namespace level
5-) each ns must define own configmap and secrets
6-) accessing service in another namespace: mysql-service.namespace 

by default components are created in a default ns

kubectx -> set default name space and avoid adding -n on every command.

Kubernetes Ingress Notes

minikube addons enable ingress
(k8s ngnix ingress controller)

kubectl get pod -n kube-system --> nginx ingresses

kubernetes-example's People

Contributors

fmelihh avatar

Stargazers

Ebubekir Karanfil avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.