User Tools

Site Tools


kubernetes:usage

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
kubernetes:usage [2021/04/07 17:03] mskubernetes:usage [2023/01/11 20:29] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +<code>
 +kubectl get all -A -o wide
 +kubectl get nodes [node-name] [-o wide]
 +kubectl describe nodes [node-name]
 +
 +</code>
 +
 ===== Namespace anlegen ===== ===== Namespace anlegen =====
 Namespace mit Namen __demo__ anlegen Namespace mit Namen __demo__ anlegen
Line 27: Line 34:
 NAME          TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)   AGE NAME          TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)   AGE
 service/web   ClusterIP   10.96.247.18   <none>        80/TCP    26m service/web   ClusterIP   10.96.247.18   <none>        80/TCP    26m
 +</code>
 +
 +Webapp als yaml ausgeben
 +<code>
 +kubectl run web --image nginx --labels app=web --expose --port 80 --dry-run=client --output=yaml
 +apiVersion: v1
 +kind: Service
 +metadata:
 +  creationTimestamp: null
 +  labels:
 +    app: web
 +  name: web
 +spec:
 +  ports:
 +  - port: 80
 +    protocol: TCP
 +    targetPort: 80
 +  selector:
 +    app: web
 +status:
 +  loadBalancer: {}
 +---
 +apiVersion: v1
 +kind: Pod
 +metadata:
 +  creationTimestamp: null
 +  labels:
 +    app: web
 +  name: web
 +spec:
 +  containers:
 +  - image: nginx
 +    name: web
 +    ports:
 +    - containerPort: 80
 +    resources: {}
 +  dnsPolicy: ClusterFirst
 +  restartPolicy: Always
 +status: {}
 </code> </code>
kubernetes/usage.1617807781.txt.gz · Last modified: 2023/01/11 20:30 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki