10
Feb

kubectl 3

   Posted by: admin   in Mẹo vặt của hiếu râu




kubectl get nodes --show-labels
kubectl label nodes <your-node-name> nodegroup=w45
apiVersion: v1
kind: Pod
metadata:
  name: nginx
  labels:
    env: test
spec:
  containers:
  - name: nginx
    image: nginx
    imagePullPolicy: IfNotPresent
  nodeSelector:
    nodegroup: w45



apiVersion: v1
kind: Pod
metadata:
  name: nginx
  labels:
    env: test
spec:
  containers:
  - name: nginx
    image: nginx
    imagePullPolicy: IfNotPresent
  nodeName: worker3.domain.com


spec:
containers:
- image: hieuvpn/lap:10
imagePullPolicy: IfNotPresent
name: lap
ports:
- containerPort: 80
protocol: TCP
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /var/www/html
name: 100mb
dnsPolicy: ClusterFirst
nodeSelector:
supportnodes: w45
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
volumes:
- hostPath:
path: /_STORAGE/support-desk
type: ""
name: 100mb

This entry was posted on Monday, February 10th, 2025 at 1:53 am and is filed under Mẹo vặt của hiếu râu. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Comments are closed at this time.