-
Notifications
You must be signed in to change notification settings - Fork 0
Home
This page is still under construction 🚧
- Start building the databases MySQL, InfluDX (telegraf)
- Wordpress, PHPmyadmin, Grafana
- Nginx, ftps
# Start
minikube start
# Display dashboard
minikube dashboard
# Stop minikube
minikube stop
# Display profile
minikube profile <"profile's name">
# Delete profile
minikube delete -p <"profile's name">
# List all params we can change
minikube config
# Display a list of global command-line options (applies to all commands)
minikube options
# List help options
minikube <"command"> --help
# Display current ip
minikube ip
# List available addons
minikube addons list
# Display all (namespaces, pods, etc)
kubectl get all
# List the current namespaces in a cluster
kubectl get namespaces
# List current pods:
kubectl get pods
# List all pods in ps output format with more information (such as node name):
kubectl get pods -o wide
# List the current deployments:
kubectl get deployments
# List the current services:
kubectl get services
# List ingress:
kubectl get ingress
# Display events with changes
kubectl get events -w
# Allow to change between namespaces. Without the name, it will list all namespaces available.
kubens <"namespace's name">
# Display IPs
kubectl get pod -o wide
- From the terminal
# Using command line (for namespace)
kubectl create namespace <"namespace's name">
#Using YALM or JSON file
kubectl apply -f <"file name">
- From Dashboard on webpage (Except Ingress)
minikube addons enable ingress
- From the terminal
# Using command line (namespace/ pod)
kubectl delete namespace <"namespace's name">
# Using YALM or JSON file and command line
kubectl delete -f <"file name">
- From Dashboard on webpage
# List the current pods in a cluster
kubectl get pods
# List the current deployment
kubectl get deployments
# List the deployment apps
kubectl get deployments.apps
# Display details about a pod/ service
kubectl describe pod <"pod name">
kubectl describe service <"service name">
# Display logs to see activity and if there are errors
kubectl logs -f <"e.g. pod name">
# Using command line
kubectl exec -it <"pod's name"> -- /bin/bash
# Check which the Operating System is (inside the pod)
cat /etc/*release
# List the available hosts(inside the pod)
cat /etc/hosts
# Display conexion between two pods (inside the pod; before you had to create a service)
ping mariadb-service
#Kubernetes has a intern DNS, for that reason is able to resolve connexion between pods.
Using the docker motor inside the minikube
- Run in the terminal:
minikube docker-env
- To point your shell to minikube's docker-daemon, run:
minikube -p minikube docker-env | Invoke-Expression
- vsftpd.conf(5) - Linux man page
- vsftpd.conf parameters
- vsftpd
- Build a FTP Server on GCP VM with vsftpd
- How To Set Up vsftpd
- vsftpd.conf reference
- FTP over SSL Clients (FTPS)
- Download telegraf for Alpine
- Configuring Telegraf
- Configuration github
- Set Up Telegraf, InfluxDB, & Grafana on Kubernetes
- telegraf for Alpine
- Downloads influxdb, telegraf
- Configuration
- Dashboards
- Using InfluxDB in Grafana
- Download grafana
- https://github.com/grafana/grafana/blob/master/packaging/docker/Dockerfile
- https://github.com/grafana/grafana/blob/master/Dockerfile
- Expose port
- MySQL Port Reference Tables
- Docker windows local ip 192.168.99.100
Kubernetes supports multiple virtual clusters backed by the same physical cluster. These virtual clusters are called namespaces.
Namespaces are intended for use in environments with many users spread across multiple teams, or projects. For clusters with a few to tens of users, you should not need to create or think about namespaces at all.
- Pods are the smallest deployable units of computing that you can create and manage in Kubernetes.
- Pod is like a container.
- Pod is the minimun unit of work.
- A Pod is a group of one or more containers, with shared storage and network resources, and a specification for how to run the containers.
A Deployment provides declarative updates for Pods and ReplicaSets.
- Kubernetes Pods are created and destroyed to match the state of your cluster. Pods are nonpermanent resources.
- ReplicaSets create and destroy Pods dynamically
A Service is an abstraction which defines a logical set of Pods and a policy by which to access them (sometimes this pattern is called a micro-service). The set of Pods targeted by a Service is usually determined by a selector. Es el punto de entrada, siempre es fijo.
Ingress exposes HTTP and HTTPS routes from outside the cluster to services within the cluster. Traffic routing is controlled by rules defined on the Ingress resource.
Internet
|
[Ingress]
----|----
[Services]
Readiness probes are designed to let Kubernetes know when the app is ready to serve traffic. Kubernetes makes sure the readiness probe passes before allowing a service to send traffic to the pod. If a readiness probe starts to fail, Kubernetes stops sending traffic to the pod until it passes.
Kubernetes uses readiness probes to decide when the container is available for accepting traffic. The readiness probe is used to control which pods are used as the backends for a service. A pod is considered ready when all of its containers are ready. If a pod is not ready, it is removed from service load balancers. For example, if a container loads a large cache at startup and takes minutes to start, you do not want to send requests to this container until it is ready, or the requests will fail—you want to route requests to other pods, which are capable of servicing requests. Una vez levantado el servicio, si esta en disposicion de aceptar o no peticiones.
Kubernetes uses liveness probes to know when to restart a container. If a container is unresponsive—perhaps the application is deadlocked due to a multi-threading defect—restarting the container can make the application more available, despite the defect. It certainly beats paging someone in the middle of the night to restart a container. Para saber si esta levantado el servicio
Kubernetes is an orchestrator for microservice apps
- Masters: there are in charge
- Nodes: are minions, they are doing the work We've got the code, and we containerize it. And, we define it in an object call a deployment, then we write it up and define in a YAML file.
Then we give the file to K8s on the master, and the master looks at the file and deploys the app on the cluster.
⚠️ Don't run user workloads on Master- API server: It's our front‑end into the master or the control plane. Kubernetes API server: main part of Master.
- The kubelet is the primary "node agent" that runs on each node.
- Registers node with cluster
- Watches apiserver
- Instantiates pods
- Reports back to master
- Exposes endpoint on :10255
If a pod fails on a node, the kubelet is not resposible for restarting it or finding another node for it to run. It simply reports the state back to the master.
Kubernetes operates in a declarative model. This means we give the API server manifest files that describe how we want the cluster to look and feel. YAML or JSON
- Kubernetes run containers always inside of pods.
- A container without a pod in Kubernetes is a naked container.
- Pods can have multiple containers (advanced use-case)
- Pod is a ring-fenced (cercado) environment to run containers. Itself doesn't run anything. It can have 1) Network stack, 2) Kernel namespaces, etc, n containers.
- All containerss in pod share the pod environment
netstat -tulpn
Powered by Diana S.