gestion_configuration:gitops:toc
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
gestion_configuration:gitops:toc [2023/01/05 19:42] – [Kubernetes Client] sgariepy | gestion_configuration:gitops:toc [2023/01/12 03:38] (Version actuelle) – [MicroK8s] sgariepy | ||
---|---|---|---|
Ligne 42: | Ligne 42: | ||
minikube addons enable dashboard | minikube addons enable dashboard | ||
minikube addons enable metrics-server | minikube addons enable metrics-server | ||
+ | minikube addons enable ingress | ||
</ | </ | ||
Ligne 53: | Ligne 54: | ||
minikube stop | minikube stop | ||
+ | |||
+ | ====== Concepts ====== | ||
+ | |||
+ | * Ingress Controller: | ||
====== Kubernetes Client ====== | ====== Kubernetes Client ====== | ||
Ligne 80: | Ligne 85: | ||
</ | </ | ||
+ | |||
+ | ===== Expose ===== | ||
+ | |||
+ | Imperative: | ||
+ | |||
+ | < | ||
+ | kubectl apply -f green.yaml | ||
+ | kubectl expose pod green --port 8080 --name blue-green | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | kubectl delete service blue-green | ||
+ | </ | ||
+ | |||
+ | Declarative: | ||
+ | |||
+ | < | ||
+ | apiVersion: v1 | ||
+ | kind: Service | ||
+ | metadata: | ||
+ | name: blue-green | ||
+ | spec: | ||
+ | type: ClusterIP | ||
+ | ports: | ||
+ | - port: 80 | ||
+ | targetPort: 8080 | ||
+ | selector: | ||
+ | app: blue-green | ||
+ | </ | ||
+ | |||
+ | $ kubectl apply -f blue-green.yaml | ||
+ | |||
+ | |||
+ | Le '' | ||
+ | |||
+ | |||
+ | |||
+ | ====== Autres commandes ====== | ||
Ligne 559: | Ligne 602: | ||
* Clients certs | * Clients certs | ||
- | * Activé en passant l' | + | * Activé en passant l' |
* Le Common name du certificat est utilisé comme utilisateur pour la requête | * Le Common name du certificat est utilisé comme utilisateur pour la requête | ||
* Static tokens | * Static tokens | ||
- | * Utilisation: | + | * Utilisation: |
* OpenID Connect | * OpenID Connect | ||
* Webhook Tokens | * Webhook Tokens | ||
Ligne 580: | Ligne 623: | ||
kubectl logs podname | kubectl logs podname | ||
</ | </ | ||
- | |||
- | |||
===== MicroK8s ===== | ===== MicroK8s ===== | ||
- | + | | |
- | + | ||
- | | + | |
- | + | ||
[[https:// | [[https:// | ||
Ligne 598: | Ligne 637: | ||
alias kubectl=' | alias kubectl=' | ||
</ | </ | ||
+ | |||
+ | ====== Ingress Example ====== | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | < | ||
+ | apiVersion: networking.k8s.io/ | ||
+ | kind: Ingress | ||
+ | metadata: | ||
+ | name: example.com | ||
+ | annotations: | ||
+ | nginx.ingress.kubernetes.io/ | ||
+ | spec: | ||
+ | rules: | ||
+ | - host: blue-green.example.com | ||
+ | http: | ||
+ | paths: | ||
+ | - path: /blue | ||
+ | backend: | ||
+ | serviceName: | ||
+ | servicePort: | ||
+ | - path: /green | ||
+ | backend: | ||
+ | serviceName: | ||
+ | servicePort: | ||
+ | - host: nginx.example.com | ||
+ | http: | ||
+ | paths: | ||
+ | - path: / | ||
+ | backend: | ||
+ | serviceName: | ||
+ | servicePort: | ||
+ | </ | ||
+ | |||
+ | |||
+ | ====== Systemd ====== | ||
+ | |||
+ | |||
+ | In file ''/ | ||
+ | |||
+ | < | ||
+ | [Unit] | ||
+ | Description=minikube | ||
+ | |||
+ | [Service] | ||
+ | Type=oneshot | ||
+ | RemainAfterExit=yes | ||
+ | ExecStart=/ | ||
+ | ExecStop=/ | ||
+ | User=username | ||
+ | Group=docker | ||
+ | |||
+ | [Install] | ||
+ | WantedBy=multi-user.target | ||
+ | </ | ||
+ | |||
+ | |||
====== ArgoCD ====== | ====== ArgoCD ====== |
gestion_configuration/gitops/toc.1672944126.txt.gz · Dernière modification : 2023/01/05 19:42 de sgariepy