Commit 42538d7d authored by Larkin Heintzman's avatar Larkin Heintzman

various updates

parent 5dc0d6dc
start here: https://kubernetes.io/docs/reference/kubectl/cheatsheet/
Commands to initialize cluster (pay attention to sudo useage):
sudo kubeadm init --pod-network-cidr=10.244.0.0/16
......@@ -77,3 +79,5 @@ handy interaction commands
get into pod bash shell (remove -it and just put command for noninteractive):
kubectl exec <pod_name> -it -- bash
kubectl get service -> good for getting port numbers
kubectl delete -f deployment.yaml -> removes (eventually) pods on the cluster in deployment
hello-python @ dc7f4e90
Subproject commit dc7f4e9024dabcc72f2a60b83458fd2bf55b4268
FROM python:3.7
RUN mkdir /app
WORKDIR /app
ADD . /app/
RUN pip install -r requirements.txt
EXPOSE 5000
CMD ["python", "/app/main.py"]
---
apiVersion: v1
kind: Service
metadata:
name: hello-python-service
spec:
selector:
app: hello-python
ports:
- protocol: "TCP"
port: 6000
targetPort: 5000
type: LoadBalancer
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-python
spec:
selector:
matchLabels:
app: hello-python
replicas: 4
template:
metadata:
labels:
app: hello-python
spec:
containers:
- name: hello-python
image: hello-python:latest
imagePullPolicy: Never
ports:
- containerPort: 5000
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment