Kubectl Kubectx Kubetail Helm: Web Web Web Web Web Web 8080 8080 Web Web Web Web Dev Dev
Kubectl Kubectx Kubetail Helm: Web Web Web Web Web Web 8080 8080 Web Web Web Web Dev Dev
version 2020-01-15 EN
# CLI setup # Create a deployment named web, using image nginx into prod namespace
CLI tools
deploy / expose
https://ibd.sh/helm
# Retrieve logs of pods with tag app=web
kubetail -l app=web
# List available contexts
contexts
kubectx # Open a tunnel listening on 127.0.0.1:8080 to the port 80 of a pod related to deployment web
kubectl port-forward deploy/web 8080:80
# Change context to dev
kubectx dev # Create a Yaml manifest, without sending it to the cluster
kubectl create deploy web --image=nginx --dry-run -o yaml > web.yml
kubens
# Change namespace to prod # Retrieve detailed state of pod test # PVC manifest example
storage / volume
kubens prod kubectl describe pod test kind: PersistentVolumeClaim
help / debug
apiVersion: v1
# Create namespace test # Get all possible attributes of a resource metadata:
kubectl create ns test name: web-data
kubectl explain pod --recursive spec:
accessModes:
# Open a bash terminal in pod app
# Ingress manifest example - ReadWriteOnce
apiVersion: networking.k8s.io/v1beta1 kubectl exec -it app -- bash resources:
kind: Ingress requests:
metadata: # NB : The flag --help provide help of any command storage: 42Gi
name: test-ingress
spec:
ingress
rules:
# Use the config file /path/to/config rather than ~/.kube/config
Web : infraBuilder.com
Command cheasheet
by Alexis DUCASTEL
forr Kubernetes 1.17
- host: foo.bar.com
configuration