Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add Kubernetes deploy HOWTO #508

Closed
wants to merge 2 commits into from
Closed

docs: Add Kubernetes deploy HOWTO #508

wants to merge 2 commits into from

Conversation

kkuehlz
Copy link
Member

@kkuehlz kkuehlz commented Apr 30, 2019

No description provided.

Copy link
Member

@Baisang Baisang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall good for the simple case, just a few changes I would recommend adding

For Kubernetes to access the file system we need two objects: a
`PersistentVolume` and a `PersistentVolumeClaim`. The former maps a filesystem
to the cluster, and the latter is how a service asks to access that filesystem.
You will need to create the `PersistentVolume` in [Puppet][puppet] as
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would update this section to use the NFS provisioner (https://github.com/ocf/nfs-provisioner). We shouldn't need to have puppet changes in order to create PVs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basically users can skip this PV part and just make a PVC with the same class as in the README for nfs-provisioner.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's important that new services do this, as it'll be more difficult for us to migrate existing services using custom puppet-defined PVs to using nfs-provisioner PVs.

name: <myapp>-nfs-pv
spec:
capacity:
storage: 30Gi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This storage capacity isn't enforceable in Kubernetes + NFS to my knowledge. Might be worth mentioning

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One potential way I can think of to enforce it is if you use a specific user for your service and all of its files, it might be subject to NFS quotas (if the user is in LDAP?)


[mastodon][mastodon-deploy] (Advanced): Applies custom patches, uses `ldap`, mounts `nfs`, has pods for `redis`, `sidekiq`, and `http-streaming`.

[kafka][kafka-deploy] (Advanced): Runs a `kafka` cluster inside of Kubernetes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zookeeper is another one to add here as an example. We can add a section for StatefulSets at a later time.

- containerPort: 8000
```

The last object we need to create for the Templates service is `Ingress`. We
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I was working on this with @abizer there was some extra crap I had to do that I don't remember exactly, we should include it here

Copy link
Member

@dkess dkess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to mention adding the domain to https://github.com/ocf/puppet/blob/master/modules/ocf_kubernetes/manifests/master/loadbalancer.pp

Also talk about version templating for comitting to prod

apiVersion: v1
kind: Service
metadata:
name: <myapp>-service
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since applications are namespaced, it's not actually necessary to include the app name in the service name. I haven't been including them for recent services


Now we have all the necessary configuration to deploy our service. To see if
everything works, we will deploy the service manually. On `supernova`, first
run `kinit`. This will obtain a [[kerberos|doc staff/backend/kerberos]] ticket
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's necessary to run kinit? If you don't have a ticket it'll show the usual password prompt

Copy link
Member

@abizer abizer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to my inexperienced eye, tyty for writing this up

Copy link
Contributor

@bzh-bzh bzh-bzh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add an addendum for migrating from Marathon about making sure the CNAMES for lb are gone from DNS, and the load balancer entries deleted from here.

@kpengboy
Copy link
Member

Is this still useful? Should it be merged?

@kkuehlz
Copy link
Member Author

kkuehlz commented May 16, 2020 via email

@kpengboy
Copy link
Member

A shame. Maybe we can leave it here in case anyone wants to build off it?

@cg505
Copy link
Member

cg505 commented May 17, 2020

i would like to leave it open for now, because although this is out of date, we do still need these docs

@kkuehlz
Copy link
Member Author

kkuehlz commented Aug 10, 2020

Thanks Bernie for picking this up in #631

@kkuehlz kkuehlz closed this Aug 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants