janakiramm / do-k8s Goto Github PK
View Code? Open in Web Editor NEWScripts to deploy Kubernetes in DigitalOcean
Scripts to deploy Kubernetes in DigitalOcean
Hi!
Thanks for building this. I played around with your repo and turned the scripts into a Makefile
. Feel free to take whatever you would like! However, I had to run
iptables -P FORWARD ACCEPT
to the nodes in order for the NodePort
service to be publically viewable (either by the DO load balancer or my browser). Any idea why?
My repo is here and the commit is here.
Current janakiram/web in DockerHub (https://hub.docker.com/r/janakiramm/web/)
actually, refers to the following Python based following Docker file @PORT 500
https://github.com/janakiramm/kubernetes-101/blob/master/Docker/build.sh.
But in the Replication Controller, Webapp refers to the NodeJS + MongoDB based App running @3000 port
https://github.com/janakiramm/do-k8s/blob/master/todo-all-in-one.yaml#L75
I am not sure about github location for this nodejs+mongodb source code.
And hence I changed this Python code to use Kube Service ENV variable with redis:alpine docker hub image.
from flask import Flask
from redis import Redis
import os
app = Flask(__name__)
redis = Redis(host=os.environ.get('DB_SERVICE_HOST', 'redis'), port=os.environ.get('DB_SERVICE_PORT', 'port'))
@app.route('/')
def hello():
redis.incr('hits')
return 'Hello Container World! I have been seen %s times.\n' % redis.get('hits')
if __name__ == "__main__":
app.run(host="0.0.0.0", port=5000, debug=True)
And everything worked. So, you may review this when you have some time to fix whichever janankiram/web accordingly.
Thanks in advance.
Hey,
Thanks for putting this together.
Just been using this to learn some K8 stuff and I come across a few issues with the mater.sh
& node.sh
scripts.
Firstly, when the script runs an apt-get update
to update the system it hangs on the below in the cloud-init-output.log
:
A new version of /boot/grub/menu.lst is available, but the version installed
currently has been locally modified.
1. install the package maintainer's version
2. keep the local version currently installed
3. show the differences between the versions
4. show a side-by-side difference between the versions
5. show a 3-way difference between available versions
6. do a 3-way merge between available versions (experimental)
7. start a new shell to examine the situation
What would you like to do about menu.lst?
I'm more familiar with RHEL but a quick bit of research reveals that setting DEBIAN_FRONTEND=noninteractive
will ensure Debian selects the default in this scenario. I added this to my master.sh
& node.sh
scripts locally and it resolved this issue.
Secondly, bootstrapping the nodes using the node.sh script results in this error:
[preflight] Running pre-flight checks.
[WARNING FileExisting-crictl]: crictl not found in system path
discovery: Invalid value: "": using token-based discovery without DiscoveryTokenCACertHashes can be unsafe. set --discovery-token-unsafe-skip-ca-verification to co
ntinue
As described in the error, adding --discovery-token-unsafe-skip-ca-verification to co ntinue
to the kubeadm command resolves this.
I will raise a pull request with these fixes.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.