learnk8s / learnk8s.io Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://learnk8s.io
Home Page: https://learnk8s.io
bundle exec jekyll server -H 0.0.0.0 --incremental
root@a7f3fe851bb1:/app# bundle exec jekyll server -H 0.0.0.0 --incremental
Configuration file: /app/_config.yml
Source: /app
Destination: /app/_site
Incremental build: enabled
Generating...
Conversion error: Jekyll::Converters::Scss encountered an error while converting 'assets/style.scss':
File to import not found or unreadable: tachyons-sass/tachyons.scss. on line 1
jekyll 3.7.3 | Error: File to import not found or unreadable: tachyons-sass/tachyons.scss. on line 1
Fix
npm install --save tachyons-sass
As per discussions in learnk8s/team#3
Readers expressed the interest in subscribing to an RSS feed.
Investigate how to add the RSS feed to Jekyll.
Install the plugin
Test locally. Result: It doe snot work with custom collections.
Time for Keithy to develop yet another Jekyll Plugin. I'll be quick this time.
Deploy to Netlify and test
Add a link somewhere.
Hi @danielepolencic ,
I'm trying to add an image to a blog post but cannot get it to work. I first copied your image tag from the "smaller images" post and updated the link but I cannot understand how the "link_blog" tag works. Can you please document this in Readme.
Thanks.
Superseded learnk8s/team#18
The following code should be placed in the <head>
:
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-5WCKPRL');</script>
<!-- End Google Tag Manager -->
body
:<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5WCKPRL"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
Title: From Zero to Kubernets for Python
Info: This blog post will help you if you have a python application and you would like to deploy it using Kubernets.
1. The application
You have a python application, in this example we will use a Python Hello world web app. This app is run in a website using flask. When accessed via your favourite web browser it prints the text "Hello World" on the page. This can be replaced by any python application.
a. [Give link to Github that includes the source code for this app]
2. Deployment
You dev this app in your local machine and then it is deployed in Test, QA and Prod environment. Sometimes you might run into an issue in other environments where it would fail on deployment
3. Docker
This is where Docker helps, if you can contain your application in an image, you can reliably deploy it on any envirnment.
a. [Brief description of Docker containers and its advantages, perhaps link to other docker resources]
b. [Show and walk through the docker file]
c.
d. Is it worth showing how a container can hold different versions of Python (2.7 / 3) without having to change your local references??
4. How can Kubernets help?
K8s helps with automating deployment, scaling and management of containers.
[Put a couple of lines on features of k8s, rolling updates, declarative configuration etc]
[Give a line on options of where k8s can be run]
[Simplified k8s architecture diagram]
[Install Minikube instructions for windows and mac]
[Install/get kubectl]
5. k8s Deployment
[Show the deployment.yaml file and point out the container name and other properties e.g. replicas etc]
[kubectl create -f deployment.yaml]
[kubectl expose]
[Perhaps show how replicasets work?]
6. Conclude
[Summarise what was learnt and provide next steps for further learning?]
When we have user contributions to the newsletter, the user_pick section should be design and the newsletter landing page should be refactored/tested.
Contributors:
An include showing up to three contributors, including a profile photo and links to GH, Twitter, website and LinkedIn if and what is available. My opinion is that precedence should be given to contributors which are not team members at LearnK8s and team members should only be shown while there are less than 3 third-party contributors. Third party contributors are community members that have submitted links to a newsletter issue (in the "Your Picks" section).
In the newsletter landing page there should be a condition stating that if contributors are specified in the front-matter then the _includes/newsletter/contributors/static.html
should be included, otherwise, the ``_includes/newsletter/contributors/latest.html` will be included as per specs above.
include
as per above specs.<!--
first, loop through all the issues until we make up three contributors that have at least their full name and their avatar.
if there's not enough contributors, then they can be manually set in frotn matter. The contributors in front matter will take precedence over the latest ones.
-->
{% assign contributors_number = 0 %}
{% assign contributors = "" %}
{% for issue in site.newsletter %}
{% if contributors_number < 3 %}
{% if issue.user_pick %}
{% for pick in issue.user_pick %}
{% if pick.user_full_name && pick.user_avatar %}
{% if contributors_number > 0 %}
{% assign contributors = contributors | append: ',' }} %}
{% endif %}
{% assign contributors = contributors | append: issue.issue | append: "-" | append: forloop.index %}
{% assign contributors_number = contributors_number | | plus: 1 %}
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
{% endfor %}
{{ contributors }}
We should add canonical tags to all the pages.
Tasks:
backstop.ts
test), for each page, load the page, parse it as Hast and check if a <link rel=“canonical” href=“https://example.com/sample-page/” />
exists.Please note that the tool should work against a working website such as http://localhost:4000
or https://learnk8s.io
Should have fixed width.
I believe
Is he Pod assigned to the Node
should be
Is the Pod assigned to the Node
awesome writeup, thank you for it!
As per discussion on #GH-47 and learnk8s/team#15 The landing page should match the following design:
and the newsltter itself should match this one:
The deliverables of this EPIC are:
A Landing Page for the newsletter, encouraging subscription as per mockup#1
A HTML template for the newsletter itself as per mockup#2
A Newsletter Archive Page containing a list of past newsletters. - may need to be revised once we have more than one or a few publications.
A Newsletter email template stored in sendinblue containing the newsletter itself with some changes to the footer (such as a link to unsubscribe) and removal of the top navigation. (current issue is how to get the CSS -> maybe using an external link? -> depends on sendinblue.
A dedicated list of subscribers hosted on sendinblue
Please do not merge the PR #GH-90 until all the above tasks have been ticked off !!!
Initial:
Develop a _newsletter
collection.
Create a blank archive page in newsletter-archive/index.html
Create a blank landing page for the newsletter subscription
/newsletter
. Add a menu item in top navigation of the website to the newsletter
landing page.
Add a menu item in footer of the website to the newsletter landing page.
Setup a dummy / first issue newsletter under
_newsletter/issue-1/index,md
.
Setup a newsletter template which will handle all front matter and includes for all the sections of the newsletter.
Must include SEO and OG data.
Should have an OG image. I think the image should be the same across all issues.
Should include the GA snippet.
Fix issue with images not getting loaded (as tested on netflify: https://deploy-preview-90--learnk8s.netlify.com/newsletter/issue-1)
Test that once the image issue is fixed, the image is tweeted from the meme include.
_pages/newsletter/README.md
file for more information.GitHub's star and fork buttons should link to their respective functionality. Starring cannot be linked (without considerable JS), but forking can.
Ability to add content at the end of the newsletter's issue.
Abiity to add custom content "easily".
Must be able to specify the sort order for each section, including the file's content.
Include the static "Enjoyed this issue?" section.
Include a link to the archive.
Include the static footer.
Design the newsletter view for desktop and mobile screens.
Awaiting review and action for the font-family
Awaiting decision on the skype icon.
Awaiting instructions regarding the dib
class on anchor tags.
Includes a reverse-chrono list of past issues.
Issue links should open in a separate tab because the newsletter itself does not have the website's navigation and thus the reader won't be able to come to the archive page _unless they hit the back button or use the back navigation shortcut.
Finalise design:
Submit for review.
Mark as complete.
Subscription development tasks:
Get API (or similar) details from SendInBlue to link the subscription form with the new contact list.
Develop an initial subscribe form and link to SendInBlue.
Test Integration.
Test validation for the form fields.
Try to reduce and localise the SendInBlue dependencies .
Setup additional tasks for the response page after subscribing - depending on how SendInBlue handles this. NO need of additional tasks other than designing the notifications.
Review tasks for the design of a welcome email
- depending on how SendInBlue handles this. No longer needed. NO emails will be sent out as there's a confirmation message on screen.
Issue Preview:
A preview of the latest issue should be automatically displayed.
Develop an include
that gets an iFrame (or similar tech) of the latest issue. The preview will be cropped to match the mockup.
Include the preview on the landing page.
Refactor this so that if an issue number is specified as a front-matter property, then this issue will be previewed as opposed to the latest one.
Contributors:
These will be manually set in front-matter until we have actual user contributions as per #95.
_includes/newsletter/contributors/static.html
.Design:
Confirm the submissions' email address.
Add a link for user submission.
Design the landing page:
Ask for review.
Complete the task.
_pages/newsletter/README.md
Waiting response regarding the existing contacts on Netlify and the existing subscribe form in footer.
Remove the dummy issue from _newsletter/issue-1
.
issue-0
and then remove it from the archive list but have it available as a preview in the landing page. Possibly add meta tags or an entry in robots file so that it is not indexed.Update link to the archive in landing page so that it doesn't show up unless there are past issues (excl. the dummy one).
@valentin2105 We need a bigger profile pict!
Kubernetes has a weekly newsletter: KubeWeekly. This is a dump of every link mentioning the word Kubernetes. I find it very hard to follow and not very informative.
There's a second and very young newsletter called Kubelist. The project just started, and I can count only three issues. It's curated ✅and human-friendly. But I think it lacks focus. It's about "all things Kubernetes", same as Kubeweekly.
There's a third newsletter KLWD - Last Week in Kubernetes Development. The newsletter is focussed primarily on maintainers and contributors.
The k8s community is not as mature as other communities. JS and Ruby have a long history when it comes to newsletters, and they have a lot of insights to offer when it comes to helping the community broadcasting news.
This is an opportunity for us to bring some of the learnings and the ❤️from other communities to k8s.
I spent some time thinking about what I'd like to read every week if I were:
I also did a lot of research into other newsletters. I targeted three large communities I'm familiar with:
You can explore newsletters from more communities from this awesome newsletter collection.
My findings in a nutshell:
So I came up with a newsletter idea in line with what learnk8s does best: helping others to get up to speed with k8s.
And this is the full newsletter
You may be asking... what about the content?
I collect daily news from r/kubernetes and twitter about Kubernetes. All the bookmarks I save are stored in Diigo.
I reckon we could get a digest of the activity of the Twitter account and the bookmarks I saved during the week to curate a newsletter.
Of course, the retweets, favs, bookmarks have to be learning k8s focussed.
Let me know what you think! @salmaniqbal @denhamparry @chrisns @valentin2105 @keithmifsud
@danielepolencic Is this intentional?
Same goes for the footer.
I think I should rebuild the navigation so that a "burger menu" is shown for XS and SM screens. I also think that I should rebuild the footer so that all content is shown in a responsive manner.
Please let me know your thoughts. I'm able to work on this task.
I'll develop an include that takes variables for the anchor's link options.
Update as per #GH-83
Look into extending Jekyll or the MD processor so that all external links are automatically opened in a new window and have the correct "rel" attribute.
Develop the feature and run integration tests.
Bear in mind and check previous posts.
Remove the include from the previous PR.
Updated the docs. Possibly just remove the content from the previous PR.
This should help with increasing the time on site as it encourages readers to read other posts.
The plugin does not work well with custom collections and does not work at all with our permalinks.
I have added a new layout for automatic redirects and also some instructions on how to use it.
@danielepolencic Am I correct to say that you'd like these to be in reverse-chronological order?
This issue is a content/code `commit1 placeholder for the tasks in learnk8s/team#40
I broke this when working on #GH-29.
This needs to fixed before publishing the next 2 articles as of today the 12th June 2018.
create an additional dummy post for testing.
Issue exists due to post_limit
in _config
file?
Plan according to the above:
Remove dummy post.
Create PR and assign to a reviewer.
Get PR merged and close.
@danielepolencic I think you have made a change instead of the normal Jekyll posts, it seems that you're placing posts inside of a dir named _blog. Why? This is not the Jekyll way! But it's fine, I got it working :)
Sorry about the above, Git could not get the latest changes because of the missing "blog" branch, but now it's fine"
Also, if possible it will be a lot better if you work on a personal fork instead of directly in the shared repo because these are breaking changes and it takes a while to reverse engineer them without any info from you.
I did so. I forked the learnk8s.io repo and will only merge upstream once. My fork is: https://github.com/keithmifsud/learnk8s.io if you have a look at the blog branch you should notice that I added an author blurb "include". Once I am done, I will submit a PR from my fork:blog to main_repo:master for your review.
I also added instructions on using the author's blurb in the readme file.
@danielepolencic I suggest that instead of just adding <!--more-->
to limit the excerpt, add a front-matter property similar to the og-description so that we are not limited to the content at the start of the article.
If you agree, I'm happy to do this.
Example checklist presentations:
https://devchecklists.com/
https://www.sqreen.com/checklists/saas-cto-security-checklist
https://securitycheckli.st/
Gruntwork production readiness checklist for AWS:
https://gruntwork.io/devops-checklist/
Production readiness checklist for Azure (copy of Gruntwork checklist for AWS):
https://azurechecklist.com/
https://github.com/ghostinthewires/Azure-Readiness-Checklist
Zalando Kubernetes Wiki:
https://kubernetes-on-aws.readthedocs.io/en/latest/user-guide/index.html
GitHub best practices list:
https://github.com/freach/kubernetes-security-best-practice
Best practices Google Sheet original:
https://docs.google.com/spreadsheets/d/1IdFXQWdmBXIeAK3T7d4h7T8YAmpvX5sES72_4z7LVuI
Best practices Google Sheet edited:
https://docs.google.com/spreadsheets/d/10tGEZblnDT2u90THyHZKQmcI5hH-SE6YDb2LDLm4cI0
@danielepolencic I use ShareThis for my social share buttons on my site. Would you like the use this too?
I have one post with the share buttons at the very start of the content and at the end of the article's content. I found this to be a lot better than just at the bottom. What would you like both or just at the end?
Do you have any text in mind? Mine says Don't be selfish...
I can set this up and send you the credentials over Keybase. If you decide to use the same service, you can choose whether to show the number of shares or not. Please let me know your choice.
Resources to include:
If you have 10 applications, should you run each of them on its own small cluster, or run all of them on one big cluster?
Related to "Should you have many small nodes ore few big nodes in your cluster?" blog post.
Here the level of granularity (to split across the small or big clusters) are applications, not pods like in the related article.
Article:
We received the following comments:
Running laravel in production using serve is considered bad practice.
— boris_eve
RUN php artisan key:generate
You should only run this one.....it should be retrieved from a secret or else things like already set cookies get funky on rebuild of the container.
RUN php artisan serve --host=0.0.0.0 --port=8181
Shouldn't this be CMD?
Also no explanation that "php artisan serve" should not be used for anything outside development and that requires a bit more kubernetes work to serve laravel without it.
— delfinom
RUN php artisan key:generate
If this is generating a secret key, this looks very wrong, because it would embed a secret key into an image that gets pushed to a registry.
If the key is ephemeral (doesn’t need to survive the containers’ lifetimes) it’s better to create it when the container runs. If it’s a persistent secret then Kubernetes has a secrets feature that is appropriate.
— sacundim
I think we should fix the content. I'm not sure what's considered to be best practice in the Laravel world.
Also, we should tweak the title again — I know what you're thinking, we went live already.
I think this article is not one-off. It isn't one of those articles that are forgotten after a while (like How to optimise your Docker images).
More and more people will look for this kind of content in the long run.
In that respect, I suggest we rename the article, but still retain most of the original one.
The titles are variations of articles already published for Heroku — i.e. I google "laravel heroku" and generated variations of the titles.
@keithmifsud let me know what you think.
Throughout https://learnk8s.io/troubleshooting-deployments there seems to be some confusion between the containers of a pod being ready and the pod itself being ready.
It is not possible to determine that a pod is ready from the default kubectl get pods output - only whether it is Running and how many of its containers are ready.
It is (unfortunately) possible for all of the containers in a pod to be Ready but the the Pod itself not to be Ready.
This is an important distinction and alters the fault finding flow.
You can see if a pod is ready in the Conditions section of kubectl describe pods...
Conditions:
Type Status
Initialized True
Ready True
ContainersReady True
PodScheduled True
Try to copy changes from this PR https://github.com/learnk8s/learnk8s.io/pull/63/files
Thank you for very informational and clearly written article https://learnk8s.io/how-many-clusters.
For the cons side of a large shared cluster, the article mentions cluster-wide services like DNS and shared resources like CPU and memory. I would like to propose mentioning also that certain Kubernetes resource kinds are not namespaced and therefore cannot be administered in isolation.
Example use case for custom resource definition (CRD) resource kind:
Two users are working in separate namespaces in a shared cluster. Users would like to deploy a particular version of operator "SampleDB". The operator requires installation of CRDs, which are not namespaced and therefore cannot be managed independently by the users working on the shared cluster. The deployment and version upgrades need to be done by the cluster administrator in coordination with the users.
I'm doing this now.
The current avatar image in a blog post is oversized.
We should change the default image from:
<img src='assets/authors/daniel_weibel.jpg' alt='Daniel Weibel' />
to
<img src='assets/authors/image-64x64.jpg' alt='<name>' srcSet="
examples/images/image-64x64.jpg 1x,
examples/images/image-128x128.jpg 2x
"/>
You can find more info about srcset here: https://www.smashingmagazine.com/2014/05/responsive-images-done-right-guide-picture-srcset/
Update al author avatars to use srcSet.
Important due to the missing rel
attributes in the previous version.
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.