srvops
Ctrlk
  • Server Ops
  • Linux
    • Network
    • Network Managment
    • Linux Fundamental
    • Open Source Application
      • Virtualization
      • Kubernetes
      • Container
      • Cloud Foundry
      • Storage
      • consul
      • zookeeper
      • log
      • version control
    • Enterprise Application
  • ServerOps
    • MA_Scripts
    • Security
    • Normal Maintenance Procedure
    • Operation
    • Config
    • Issue & solution
  • Windows
    • Activity Directory
  • DevOps
    • CI/CD
    • JAVA
Powered by GitBook
On this page
  1. Linux
  2. Open Source Application

Kubernetes

https://www.zhihu.com/topic/20054173/hotwww.zhihu.com

Use kubernetes deploy nginx

Operators

https://github.com/operator-framework/awesome-operators

PreviousVagrantfileNextContainer

Last updated 6 years ago

kubectl apply -f ./nginx.yaml
nginx.yaml
apiVersion: apps/v1
 kind: Deployment
 metadata:
   name: nginx
 spec:
   replicas: 3
   selector:
     matchLabels:
       app-name: my-nginx
   template:
     metadata:
       labels:
         app-name: my-nginx
     spec:
       containers:
         - name: nginx
           image: nginx
 ---
 apiVersion: v1
 kind: Service
 metadata:
   name: nginx
 spec:
   selector:
     app-name: my-nginx
   type: ClusterIP
   ports:
     - name: http
       port: 80
       protocol: TCP
       targetPort: 80