File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,6 +20,100 @@ pypi-server run -p 8080 ~/package
2020pip install --index-url http://localhost:8080/simple picker
2121```
2222
23+ ``` yaml
24+ # DEPLOY ON KUBERNETES
25+ ---
26+ apiVersion : v1
27+ kind : PersistentVolumeClaim
28+ metadata :
29+ name : pypiserver-pvc
30+ labels :
31+ app.kubernetes.io/name : pypiserver
32+ spec :
33+ accessModes :
34+ - ReadWriteOnce
35+ resources :
36+ requests :
37+ storage : 1Gi
38+ ---
39+ apiVersion : v1
40+ kind : Service
41+ metadata :
42+ name : pypiserver
43+ labels :
44+ app.kubernetes.io/name : pypiserver
45+ spec :
46+ type : ClusterIP
47+ ports :
48+ - port : 8080
49+ targetPort : http
50+ protocol : TCP
51+ name : http
52+ selector :
53+ app.kubernetes.io/name : pypiserver
54+ ---
55+ apiVersion : apps/v1
56+ kind : Deployment
57+ metadata :
58+ name : pypiserver
59+ labels :
60+ app.kubernetes.io/name : pypiserver
61+ spec :
62+ replicas : 1
63+ selector :
64+ matchLabels :
65+ app.kubernetes.io/name : pypiserver
66+ template :
67+ metadata :
68+ labels :
69+ app.kubernetes.io/name : pypiserver
70+ spec :
71+ containers :
72+ - name : pypiserver
73+ image : pypiserver/pypiserver:v2.3.2
74+ imagePullPolicy : IfNotPresent
75+ args :
76+ - run
77+ - -a
78+ - .
79+ - -P
80+ - .
81+ - /data/packages
82+ env :
83+ - name : PYPISERVER_PORT
84+ value : " 8080"
85+ ports :
86+ - name : http
87+ containerPort : 8080
88+ protocol : TCP
89+ readinessProbe :
90+ httpGet :
91+ path : /health
92+ port : http
93+ livenessProbe :
94+ httpGet :
95+ path : /health
96+ port : http
97+ volumeMounts :
98+ - name : packages
99+ mountPath : /data/packages
100+ volumes :
101+ - name : packages
102+ persistentVolumeClaim
103+ claimName : pypiserver-pvc
104+ ` ` `
105+
106+ ` ` ` bash
107+ # COPY PACKAGES TO POD
108+ kubectl cp ~/packages/ pypiserver-fb7b96d8-cfkf8:/data/
109+
110+ # PORT-FORWARD SVC
111+ kubectl port-forward svc/pypiserver 8080:8080
112+
113+ # INSTALL PACKAGE FROM SERVER/POD
114+ pip install --index-url http://localhost:8080/simple picker
115+ ```
116+
23117</details >
24118
25119<details ><summary >CLI-ARGS TO DICT</summary >
You can’t perform that action at this time.
0 commit comments