Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
ROS-Kubernetes
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Larkin Heintzman
ROS-Kubernetes
Commits
42538d7d
Commit
42538d7d
authored
Oct 05, 2021
by
Larkin Heintzman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
various updates
parent
5dc0d6dc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
0 deletions
+49
-0
ClusterSetup.txt
ClusterSetup.txt
+4
-0
hello-python
hello-python
+1
-0
Dockerfile
kubernetesPython/hello-python/app/Dockerfile
+9
-0
pythonWebDeployment.yaml
pythonWebDeployment.yaml
+35
-0
No files found.
ClusterSetup.txt
View file @
42538d7d
start here: https://kubernetes.io/docs/reference/kubectl/cheatsheet/
Commands to initialize cluster (pay attention to sudo useage):
Commands to initialize cluster (pay attention to sudo useage):
sudo kubeadm init --pod-network-cidr=10.244.0.0/16
sudo kubeadm init --pod-network-cidr=10.244.0.0/16
...
@@ -77,3 +79,5 @@ handy interaction commands
...
@@ -77,3 +79,5 @@ handy interaction commands
get into pod bash shell (remove -it and just put command for noninteractive):
get into pod bash shell (remove -it and just put command for noninteractive):
kubectl exec <pod_name> -it -- bash
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
kubernetesPython/hello-python/app/Dockerfile
0 → 100644
View file @
42538d7d
FROM
python:3.7
RUN
mkdir
/app
WORKDIR
/app
ADD
. /app/
RUN
pip
install
-r
requirements.txt
EXPOSE
5000
CMD
["python", "/app/main.py"]
pythonWebDeployment.yaml
0 → 100644
View file @
42538d7d
---
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment